Class: DigiwinDsp::Authenticator
- Inherits:
-
Object
- Object
- DigiwinDsp::Authenticator
- Defined in:
- lib/digiwin_dsp/authenticator.rb
Constant Summary collapse
- HEADER_NAME =
"DSP-api-key"
Instance Method Summary collapse
- #auth_headers ⇒ Object
-
#initialize(configuration = DigiwinDsp.configuration) ⇒ Authenticator
constructor
A new instance of Authenticator.
Constructor Details
#initialize(configuration = DigiwinDsp.configuration) ⇒ Authenticator
Returns a new instance of Authenticator.
7 8 9 |
# File 'lib/digiwin_dsp/authenticator.rb', line 7 def initialize(configuration = DigiwinDsp.configuration) @configuration = configuration end |
Instance Method Details
#auth_headers ⇒ Object
11 12 13 14 |
# File 'lib/digiwin_dsp/authenticator.rb', line 11 def auth_headers @configuration.validate! { HEADER_NAME => @configuration.api_key } end |