Class: IAuthU::Authenticator::LDAP::Builder
- Inherits:
-
Object
- Object
- IAuthU::Authenticator::LDAP::Builder
- Defined in:
- lib/iauthu/authenticator/ldap.rb
Instance Method Summary collapse
- #base(str) ⇒ Object
- #config ⇒ Object
- #credentials(creds) ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
- #ldap_auth ⇒ Object
- #login_format(str) ⇒ Object
- #port(num) ⇒ Object
- #servers(*svrs) ⇒ Object
- #use_ssl(bool = true) ⇒ Object
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
41 42 43 |
# File 'lib/iauthu/authenticator/ldap.rb', line 41 def initialize @config = {} end |
Instance Method Details
#base(str) ⇒ Object
53 54 55 |
# File 'lib/iauthu/authenticator/ldap.rb', line 53 def base(str) @config[:base] = str end |
#config ⇒ Object
65 66 67 |
# File 'lib/iauthu/authenticator/ldap.rb', line 65 def config @config end |
#credentials(creds) ⇒ Object
69 70 71 |
# File 'lib/iauthu/authenticator/ldap.rb', line 69 def credentials(creds) @config[:credentials] = creds.to_a end |
#ldap_auth ⇒ Object
73 74 75 |
# File 'lib/iauthu/authenticator/ldap.rb', line 73 def ldap_auth LDAP.new(config) end |
#login_format(str) ⇒ Object
57 58 59 |
# File 'lib/iauthu/authenticator/ldap.rb', line 57 def login_format(str) @config[:login_format] = str end |
#port(num) ⇒ Object
49 50 51 |
# File 'lib/iauthu/authenticator/ldap.rb', line 49 def port(num) @config[:port] = num end |
#servers(*svrs) ⇒ Object
45 46 47 |
# File 'lib/iauthu/authenticator/ldap.rb', line 45 def servers(*svrs) @config[:servers] = svrs end |
#use_ssl(bool = true) ⇒ Object
61 62 63 |
# File 'lib/iauthu/authenticator/ldap.rb', line 61 def use_ssl(bool=true) @config[:use_ssl] end |