Module: SwiftypeAppSearch::Client::SignedSearchOptions::ClassMethods
- Defined in:
- lib/swiftype-app-search/client.rb
Instance Method Summary collapse
-
#create_signed_search_key(api_key, api_key_name, options = {}) ⇒ String
Build a JWT for authentication.
Instance Method Details
#create_signed_search_key(api_key, api_key_name, options = {}) ⇒ String
Build a JWT for authentication
47 48 49 50 |
# File 'lib/swiftype-app-search/client.rb', line 47 def create_signed_search_key(api_key, api_key_name, = {}) payload = Utils.symbolize_keys().merge(:api_key_name => api_key_name) JWT.encode(payload, api_key, ALGORITHM) end |