Class: SwaggerPetstore::ApiKey
- Inherits:
-
CoreLibrary::HeaderAuth
- Object
- CoreLibrary::HeaderAuth
- SwaggerPetstore::ApiKey
- Defined in:
- lib/swagger_petstore/http/auth/api_key.rb
Overview
Utility class for custom header authorization.
Instance Method Summary collapse
-
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
-
#initialize(api_key_credentials) ⇒ ApiKey
constructor
Initialization constructor.
Constructor Details
#initialize(api_key_credentials) ⇒ ApiKey
Initialization constructor.
16 17 18 19 20 21 22 |
# File 'lib/swagger_petstore/http/auth/api_key.rb', line 16 def initialize(api_key_credentials) auth_params = {} auth_params['api_key'] = api_key_credentials.api_key unless api_key_credentials.nil? || api_key_credentials.api_key.nil? super auth_params end |
Instance Method Details
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
11 12 13 |
# File 'lib/swagger_petstore/http/auth/api_key.rb', line 11 def 'ApiKey: api_key is undefined.' end |