Class: Rack::Auth::AbstractRequest

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

Direct Known Subclasses

Basic::Request, Digest::Request

Constant Summary

Instance Method Summary (collapse)

Constructor Details

- (AbstractRequest) initialize(env)

Returns a new instance of AbstractRequest



7
8
9
# File 'rack/rack/auth/abstract/request.rb', line 7

def initialize(env)
  @env = env
end

Instance Method Details

- (void) params



27
28
29
# File 'rack/rack/auth/abstract/request.rb', line 27

def params
  @params ||= parts.last
end

- (void) parts



19
20
21
# File 'rack/rack/auth/abstract/request.rb', line 19

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

- (Boolean) provided?

Returns:

  • (Boolean)


15
16
17
# File 'rack/rack/auth/abstract/request.rb', line 15

def provided?
  !authorization_key.nil?
end

- (void) request



11
12
13
# File 'rack/rack/auth/abstract/request.rb', line 11

def request
  @request ||= Request.new(@env)
end

- (void) scheme



23
24
25
# File 'rack/rack/auth/abstract/request.rb', line 23

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