# class Rack::Auth::AbstractRequest

### Constants

AUTHORIZATION_KEYS

### Public Class Methods

new(env) click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 7
    def initialize(env)
      @env = env
    end

### Public Instance Methods

params() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 31
    def params
      @params ||= parts.last
    end

parts() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 23
    def parts
      @parts ||= @env[authorization_key].split(' ', 2)
    end

provided?() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 15
    def provided?
      !authorization_key.nil? && valid?
    end

request() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 11
    def request
      @request ||= Request.new(@env)
    end

scheme() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 27
    def scheme
      @scheme ||= parts.first && parts.first.downcase
    end

valid?() click to toggle source

    # File lib/rack/auth/abstract/request.rb, line 19
    def valid?
      !@env[authorization_key].nil?
    end

### Private Instance Methods

authorization_key() click to toggle source

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