Class: Rack::Auth::Ldap::Request
- Inherits:
-
Auth::AbstractRequest
- Object
- Auth::AbstractRequest
- Rack::Auth::Ldap::Request
- Defined in:
- lib/rack/auth/ldap.rb
Overview
Note:
please do not instantiate manually, used by Rack::Auth:Ldap
Request class the LDAP credentials authenticator
Instance Method Summary collapse
-
#basic? ⇒ FalseClass, TrueClass
return true if the auth scheme provide is really a basic scheme.
-
#credentials ⇒ Array
return an array of the two credentials [username,password].
-
#password ⇒ String
read accessor on the last credentials, password.
-
#username ⇒ String
read accessor on the first credentials, username.
Instance Method Details
#basic? ⇒ FalseClass, TrueClass
return true if the auth scheme provide is really a basic scheme
176 177 178 |
# File 'lib/rack/auth/ldap.rb', line 176 def basic? !parts.first.nil? && "basic" == scheme end |
#credentials ⇒ Array
return an array of the two credentials [username,password]
182 183 184 |
# File 'lib/rack/auth/ldap.rb', line 182 def credentials @credentials ||= params.unpack("m*").first.split(/:/, 2) end |
#password ⇒ String
read accessor on the last credentials, password
194 195 196 |
# File 'lib/rack/auth/ldap.rb', line 194 def password credentials.last end |
#username ⇒ String
read accessor on the first credentials, username
188 189 190 |
# File 'lib/rack/auth/ldap.rb', line 188 def username credentials.first end |