Class: SwaggerPetstoreOpenApi30::CustomHeaderAuthentication
- Inherits:
-
CoreLibrary::HeaderAuth
- Object
- CoreLibrary::HeaderAuth
- SwaggerPetstoreOpenApi30::CustomHeaderAuthentication
- Defined in:
- lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb
Overview
Utility class for custom header authorization.
Instance Method Summary collapse
-
#error_message ⇒ Object
Display error message on occurrence of authentication failure.
-
#initialize(custom_header_authentication_credentials) ⇒ CustomHeaderAuthentication
constructor
Initialization constructor.
Constructor Details
#initialize(custom_header_authentication_credentials) ⇒ CustomHeaderAuthentication
Initialization constructor.
16 17 18 19 20 21 22 |
# File 'lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb', line 16 def initialize(custom_header_authentication_credentials) auth_params = {} auth_params['api_key'] = custom_header_authentication_credentials.api_key unless custom_header_authentication_credentials.nil? || custom_header_authentication_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_open_api30/http/auth/custom_header_authentication.rb', line 11 def 'CustomHeaderAuthentication: api_key is undefined.' end |