Class: Rack::Authentication::Request
- Inherits:
-
Object
- Object
- Rack::Authentication::Request
- Defined in:
- lib/rack/authentication/request.rb
Instance Method Summary collapse
- #authorized? ⇒ Boolean
- #good? ⇒ Boolean
-
#initialize(env, config) ⇒ Request
constructor
A new instance of Request.
- #type ⇒ Object
Constructor Details
#initialize(env, config) ⇒ Request
Returns a new instance of Request.
4 5 6 7 8 9 10 11 |
# File 'lib/rack/authentication/request.rb', line 4 def initialize(env, config) @env = env @adapter = config.adapter.new({ type: type, credentials: credentials, env: @env }) end |
Instance Method Details
#authorized? ⇒ Boolean
13 14 15 |
# File 'lib/rack/authentication/request.rb', line 13 def @adapter. end |
#good? ⇒ Boolean
17 18 19 |
# File 'lib/rack/authentication/request.rb', line 17 def good? @adapter.good? end |
#type ⇒ Object
21 22 23 |
# File 'lib/rack/authentication/request.rb', line 21 def type @type ||= params[0].to_s end |