Class: K8y::REST::Auth::Token
- Defined in:
- lib/k8y/rest/auth/token.rb
Instance Method Summary collapse
- #configure_connection(connection) ⇒ Object
-
#initialize(token:) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(token:) ⇒ Token
Returns a new instance of Token.
9 10 11 12 |
# File 'lib/k8y/rest/auth/token.rb', line 9 def initialize(token:) super() @token = token end |
Instance Method Details
#configure_connection(connection) ⇒ Object
14 15 16 |
# File 'lib/k8y/rest/auth/token.rb', line 14 def configure_connection(connection) connection.headers[:Authorization] = "Bearer #{token}" end |