Method: OpenNebula::LdapAuth#authenticate

Defined in:
lib/opennebula/ldap_auth.rb

#authenticate(user, password) ⇒ Object



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/opennebula/ldap_auth.rb', line 177

def authenticate(user, password)
    ldap=@ldap.clone

    auth={
        :method => @options[:auth_method],
        :username => user,
        :password => password
    }

    if ldap.bind(auth)
        true
    else
        false
    end
end