com.googlecode.fascinator.common
Class LdapAuthentication

java.lang.Object
  extended by com.googlecode.fascinator.common.LdapAuthentication

public class LdapAuthentication
extends Object

Very simple LDAP authentication

Author:
Oliver Lucido

Constructor Summary
LdapAuthentication(String baseUrl, String baseDn)
          Creates an LDAP authenticator for the specified server and base DN, using the default identifier attribute "uid"
LdapAuthentication(String baseUrl, String baseDn, String idAttr)
          Creates an LDAP authenticator for the specified server, base DN and identifier attribute
 
Method Summary
 boolean authenticate(String username, String password)
          Attempts to authenticate user credentials with the LDAP server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapAuthentication

public LdapAuthentication(String baseUrl,
                          String baseDn)
Creates an LDAP authenticator for the specified server and base DN, using the default identifier attribute "uid"

Parameters:
baseUrl - LDAP server URL
baseDn - LDAP base DN

LdapAuthentication

public LdapAuthentication(String baseUrl,
                          String baseDn,
                          String idAttr)
Creates an LDAP authenticator for the specified server, base DN and identifier attribute

Parameters:
baseUrl - LDAP server URL
baseDn - LDAP base DN
idAttr - LDAP user identifier attribute
Method Detail

authenticate

public boolean authenticate(String username,
                            String password)
Attempts to authenticate user credentials with the LDAP server

Parameters:
username - a username
password - a password
Returns:
true if authentication was successful, false otherwise


Copyright © 2009-2012. All Rights Reserved.