Class: Rack::Auth::Ldap
- Inherits:
-
AbstractHandler
- Object
- AbstractHandler
- Rack::Auth::Ldap
- Defined in:
- lib/rack/auth/ldap.rb
Overview
Note:
please do not instantiate, this classe is reserved to Rack
class Ldap, the main authentication component for Rack inherited from the default Rack::Auth::AbstractHandler
Defined Under Namespace
Classes: Request
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
the config read accessor.
Instance Method Summary collapse
-
#call(env) ⇒ Array
call wrapper to provide authentication if not.
-
#initialize(app, config_options = {}) ⇒ Ldap
constructor
initializer for the Ldap Class.
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
the config read accessor
91 92 93 |
# File 'lib/rack/auth/ldap.rb', line 91 def config @config end |
Instance Method Details
#call(env) ⇒ Array
call wrapper to provide authentication if not
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/rack/auth/ldap.rb', line 108 def call(env) auth = Ldap::Request.new(env) return unless auth.provided? return bad_request unless auth.basic? if valid?(auth) env['REMOTE_USER'] = auth.username return @app.call(env) end end |