Class: Rack::Auth::Bearer::Request
- Inherits:
-
AbstractRequest
- Object
- AbstractRequest
- Rack::Auth::Bearer::Request
- Defined in:
- lib/hadley/authz/bearer.rb
Overview
This class represents a custom rack authorization request type for bearer token based authorization
Instance Method Summary collapse
-
#bearer? ⇒ Boolean
Provides a means to determin if the current requests authorization type is ‘Bearer’.
-
#token ⇒ String
Provides access to the bearer token associated with the current request.
Instance Method Details
#bearer? ⇒ Boolean
Provides a means to determin if the current requests authorization type is ‘Bearer’.
10 11 12 |
# File 'lib/hadley/authz/bearer.rb', line 10 def bearer? :bearer == scheme end |
#token ⇒ String
Provides access to the bearer token associated with the current request.
17 18 19 |
# File 'lib/hadley/authz/bearer.rb', line 17 def token @token ||= params.split(' ', 2).first end |