Class: Jsapi::Controller::Authentication::Credentials::HTTP::Bearer
- Defined in:
- lib/jsapi/controller/authentication/credentials/http/bearer.rb
Overview
Holds a token passed according to HTTP Bearer Authentication.
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
The decoded token.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(authorization) ⇒ Bearer
constructor
A new instance of Bearer.
-
#well_formed? ⇒ Boolean
:nodoc:.
Constructor Details
#initialize(authorization) ⇒ Bearer
Returns a new instance of Bearer.
15 16 17 18 19 20 |
# File 'lib/jsapi/controller/authentication/credentials/http/bearer.rb', line 15 def initialize() super @token = Base64.decode64(auth_param) \ if auth_scheme == 'Bearer' && auth_param.present? end |
Instance Attribute Details
#token ⇒ Object (readonly)
The decoded token.
13 14 15 |
# File 'lib/jsapi/controller/authentication/credentials/http/bearer.rb', line 13 def token @token end |
Instance Method Details
#well_formed? ⇒ Boolean
:nodoc:
22 23 24 |
# File 'lib/jsapi/controller/authentication/credentials/http/bearer.rb', line 22 def well_formed? # :nodoc: !token.nil? end |