class Rack::Auth::Ldap::Request

Request class the LDAP credentials authenticator @note please do not instantiate manually, used by Rack::Auth:Ldap

Public Instance Methods

basic?() click to toggle source

return true if the auth scheme provide is really a basic scheme @return [FalseClass,TrueClass] the result

# File lib/rack/auth/ldap.rb, line 176
def basic?
  !parts.first.nil? && "basic" == scheme
end
credentials() click to toggle source

return an array of the two credentials [username,password] @return [Array] the couple [username,password]

# File lib/rack/auth/ldap.rb, line 182
def credentials
  @credentials ||= params.unpack("m*").first.split(/:/, 2)
end
password() click to toggle source

read accessor on the last credentials, password @return [String] the password

# File lib/rack/auth/ldap.rb, line 194
def password
  credentials.last
end
username() click to toggle source

read accessor on the first credentials, username @return [String] the username

# File lib/rack/auth/ldap.rb, line 188
def username
  credentials.first
end