class Rack::Auth::AbstractRequest

Constants

AUTHORIZATION_KEYS

Public Class Methods

new(env) click to toggle source
# File lib/rack/auth/abstract/request.rb, line 6
def initialize(env)
  @env = env
end

Public Instance Methods

params() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 30
def params
  @params ||= parts.last
end
parts() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 22
def parts
  @parts ||= @env[authorization_key].split(' ', 2)
end
provided?() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 14
def provided?
  !authorization_key.nil? && valid?
end
request() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 10
def request
  @request ||= Request.new(@env)
end
scheme() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 26
def scheme
  @scheme ||= parts.first && parts.first.downcase
end
valid?() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 18
def valid?
  !@env[authorization_key].nil?
end

Private Instance Methods

authorization_key() click to toggle source
# File lib/rack/auth/abstract/request.rb, line 39
def authorization_key
  @authorization_key ||= AUTHORIZATION_KEYS.detect { |key| @env.has_key?(key) }
end