Module: ZuoraConnect::LDAP::Adapter

Defined in:
app/helpers/zuora_connect/LDAP/adapter.rb

Class Method Summary collapse

Class Method Details

.valid_credentials?(login, password_plaintext) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/zuora_connect/LDAP/adapter.rb', line 4

def self.valid_credentials?(, password_plaintext)
  options = {
    login: ,
    password: password_plaintext,
    ldap_auth_username_builder: proc { |attribute, , _| "#{attribute}=#{}" },
    admin: true
  }
  ldap_connection = ZuoraConnect::LDAP::Connection.new(options)
  ldap_connection.authorized?
end