Class: Rack::Auth::AbstractRequest
- Inherits:
-
Object
- Object
- Rack::Auth::AbstractRequest
show all
- Defined in:
- lib/rack/auth/abstract/request.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractRequest.
7
8
9
|
# File 'lib/rack/auth/abstract/request.rb', line 7
def initialize(env)
@env = env
end
|
Instance Method Details
#params ⇒ Object
27
28
29
|
# File 'lib/rack/auth/abstract/request.rb', line 27
def params
@params ||= parts.last
end
|
#parts ⇒ Object
19
20
21
|
# File 'lib/rack/auth/abstract/request.rb', line 19
def parts
@parts ||= @env[authorization_key].split(' ', 2)
end
|
#provided? ⇒ Boolean
15
16
17
|
# File 'lib/rack/auth/abstract/request.rb', line 15
def provided?
!authorization_key.nil?
end
|
#request ⇒ Object
11
12
13
|
# File 'lib/rack/auth/abstract/request.rb', line 11
def request
@request ||= Request.new(@env)
end
|
#scheme ⇒ Object
23
24
25
|
# File 'lib/rack/auth/abstract/request.rb', line 23
def scheme
@scheme ||= parts.first && parts.first.downcase
end
|