Class: X::BearerTokenAuthenticator
- Inherits:
-
Authenticator
- Object
- Authenticator
- X::BearerTokenAuthenticator
- Defined in:
- lib/x/bearer_token_authenticator.rb
Constant Summary
Constants inherited from Authenticator
Authenticator::AUTHENTICATION_HEADER
Instance Attribute Summary collapse
-
#bearer_token ⇒ Object
Returns the value of attribute bearer_token.
Instance Method Summary collapse
- #header(_request) ⇒ Object
-
#initialize(bearer_token:) ⇒ BearerTokenAuthenticator
constructor
rubocop:disable Lint/MissingSuper.
Constructor Details
#initialize(bearer_token:) ⇒ BearerTokenAuthenticator
rubocop:disable Lint/MissingSuper
7 8 9 |
# File 'lib/x/bearer_token_authenticator.rb', line 7 def initialize(bearer_token:) # rubocop:disable Lint/MissingSuper @bearer_token = bearer_token end |
Instance Attribute Details
#bearer_token ⇒ Object
Returns the value of attribute bearer_token.
5 6 7 |
# File 'lib/x/bearer_token_authenticator.rb', line 5 def bearer_token @bearer_token end |
Instance Method Details
#header(_request) ⇒ Object
11 12 13 |
# File 'lib/x/bearer_token_authenticator.rb', line 11 def header(_request) {AUTHENTICATION_HEADER => "Bearer #{bearer_token}"} end |