Class: IAuthU::Authenticator::LDAP::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/iauthu/authenticator/ldap.rb

Instance Method Summary collapse

Constructor Details

#initializeBuilder

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

#configObject



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_authObject



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 (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