com.atlassian.user.impl.ldap.security.authentication
Class DefaultLDAPAuthenticator
java.lang.Object
com.atlassian.user.impl.ldap.security.authentication.DefaultLDAPAuthenticator
- All Implemented Interfaces:
- Authenticator
- public class DefaultLDAPAuthenticator
- extends java.lang.Object
- implements Authenticator
Method Summary |
boolean |
authenticate(java.lang.String username,
java.lang.String password)
Entering blank password will always fail, regardless of whether the underlying LDAP allows anonymous user
connects. |
RepositoryIdentifier |
getRepository()
Gets the repository which the authenticator belongs to |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultLDAPAuthenticator
public DefaultLDAPAuthenticator(RepositoryIdentifier repositoryIdentifier,
LdapContextFactory contextFactory,
LdapSearchProperties searchProperties,
LdapConnectionProperties connectionProperties,
LdapFilterFactory filterFactory)
authenticate
public boolean authenticate(java.lang.String username,
java.lang.String password)
throws EntityException
- Entering blank password will always fail, regardless of whether the underlying LDAP allows anonymous user
connects.
This code duplicates the logic in the LDAPCredentialsProvider of OSUUser: authenticate(String name, String
password)
Sets up a LDAP DirContext (that will contain the credentials the user has just entered), and tries to perform a
search with it as a means of testing whether the credentials passed in are correct.
- Specified by:
authenticate
in interface Authenticator
- Returns:
- true if the username and password were successfully authenticated, false otherwise
- Throws:
EntityException
getRepository
public RepositoryIdentifier getRepository()
- Gets the repository which the authenticator belongs to
- Specified by:
getRepository
in interface Authenticator
Copyright © 2005-2007 Atlassian Software Systems Pty Ltd. All Rights Reserved.