Class: Net::LDAP::AuthAdapter
- Inherits:
-
Object
- Object
- Net::LDAP::AuthAdapter
show all
- Defined in:
- lib/net/ldap/auth_adapter.rb,
lib/net/ldap/auth_adapter/sasl.rb,
lib/net/ldap/auth_adapter/simple.rb
Defined Under Namespace
Classes: Sasl, Simple
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AuthAdapter.
20
21
22
|
# File 'lib/net/ldap/auth_adapter.rb', line 20
def initialize(conn)
@connection = conn
end
|
Class Method Details
.[](name) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/net/ldap/auth_adapter.rb', line 12
def self.[](name)
a = @adapters[name]
if a.nil?
raise Net::LDAP::AuthMethodUnsupportedError, "Unsupported auth method (#{name})"
end
return a
end
|
.register(names, adapter) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/net/ldap/auth_adapter.rb', line 4
def self.register(names, adapter)
names = Array(names)
@adapters ||= {}
names.each do |name|
@adapters[name] = adapter
end
end
|
Instance Method Details
#bind ⇒ Object
24
25
26
|
# File 'lib/net/ldap/auth_adapter.rb', line 24
def bind
raise "bind method must be overwritten"
end
|