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