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.
5
6
7
|
# File 'lib/rack/auth/abstract/request.rb', line 5
def initialize(env)
@env = env
end
|
Instance Method Details
#params ⇒ Object
21
22
23
|
# File 'lib/rack/auth/abstract/request.rb', line 21
def params
@params ||= parts.last
end
|
#parts ⇒ Object
13
14
15
|
# File 'lib/rack/auth/abstract/request.rb', line 13
def parts
@parts ||= @env[authorization_key].split(' ', 2)
end
|
#provided? ⇒ Boolean
9
10
11
|
# File 'lib/rack/auth/abstract/request.rb', line 9
def provided?
!authorization_key.nil?
end
|
#scheme ⇒ Object
17
18
19
|
# File 'lib/rack/auth/abstract/request.rb', line 17
def scheme
@scheme ||= parts.first.downcase.to_sym
end
|