Class: Rack::Auth::AbstractRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/auth/abstract/request.rb

Direct Known Subclasses

Basic::Request, Digest::Request

Constant Summary

Instance Method Summary (collapse)

Constructor Details

- (AbstractRequest) initialize(env)



5
6
7
# File 'lib/rack/auth/abstract/request.rb', line 5

def initialize(env)
  @env = env
end

Instance Method Details

- (Object) params



21
22
23
# File 'lib/rack/auth/abstract/request.rb', line 21

def params
  @params ||= parts.last
end

- (Object) parts



13
14
15
# File 'lib/rack/auth/abstract/request.rb', line 13

def parts
  @parts ||= @env[authorization_key].split(' ', 2)
end

- (Boolean) provided?



9
10
11
# File 'lib/rack/auth/abstract/request.rb', line 9

def provided?
  !authorization_key.nil?
end

- (Object) scheme



17
18
19
# File 'lib/rack/auth/abstract/request.rb', line 17

def scheme
  @scheme ||= parts.first.downcase.to_sym
end