Class: HTTP::AuthorizationHeader::BearerToken Deprecated
- Inherits:
-
Object
- Object
- HTTP::AuthorizationHeader::BearerToken
- Defined in:
- lib/http/authorization_header/bearer_token.rb
Overview
Deprecated.
Will be remove in v0.7.0
OAuth2 Bearer token authorization header builder
Instance Method Summary collapse
-
#initialize(opts) ⇒ BearerToken
constructor
A new instance of BearerToken.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(opts) ⇒ BearerToken
Returns a new instance of BearerToken.
13 14 15 16 17 18 |
# File 'lib/http/authorization_header/bearer_token.rb', line 13 def initialize(opts) warn "#{Kernel.caller.first}: [DEPRECATION] BearerToken deprecated." @token = opts.fetch :token @token = Base64.strict_encode64 @token if opts.fetch(:encode, false) end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
21 22 23 |
# File 'lib/http/authorization_header/bearer_token.rb', line 21 def to_s "Bearer #{@token}" end |