edu.vt.middleware.ldap.jaas
Class JaasAuthenticator
java.lang.Object
edu.vt.middleware.ldap.auth.AbstractAuthenticator<AuthenticatorConfig>
edu.vt.middleware.ldap.auth.Authenticator
edu.vt.middleware.ldap.jaas.JaasAuthenticator
- All Implemented Interfaces:
- Serializable
public class JaasAuthenticator
- extends Authenticator
JaasAuthenticator is the default implementation for JAAS
authentication.
- Version:
- $Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
- Author:
- Middleware Services
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaasAuthenticator
public JaasAuthenticator()
- Default constructor.
JaasAuthenticator
public JaasAuthenticator(AuthenticatorConfig authConfig)
- This will create a new
JaasAuthenticator with the supplied
AuthenticatorConfig.
- Parameters:
authConfig - AuthenticatorConfig
authenticate
public Attributes authenticate(String user,
Object credential,
String[] retAttrs)
throws NamingException
- This will authenticate by binding to the LDAP with the supplied user and
credential. If
AuthenticatorConfig.setAuthorizationFilter(java.lang.String) has been
called, then it will be used to authorize the user by performing an ldap
compare. See Authenticator.authenticate(String, Object, SearchFilter, String[])
- Overrides:
authenticate in class Authenticator
- Parameters:
user - String username for bindcredential - Object credential for bindretAttrs - String[] to return
- Returns:
Attributes - of authenticated user
- Throws:
NamingException - if any of the ldap operations fail
authenticate
public Attributes authenticate(String user,
Object credential,
String[] retAttrs,
AuthenticationResultHandler[] authHandler,
AuthorizationHandler[] authzHandler)
throws NamingException
- This will authenticate by binding to the LDAP with the supplied user and
credential. The user's DN will be looked up before performing the bind by
calling
DnResolver.resolve(String). See AbstractAuthenticator.authenticateAndAuthorize(String, Object, boolean, String[],
AuthenticationResultHandler[], AuthorizationHandler[]).
- Overrides:
authenticate in class Authenticator
- Parameters:
user - String username for bindcredential - Object credential for bindretAttrs - String[] to returnauthHandler - AuthenticationResultHandler[] to post
process authentication resultsauthzHandler - AuthorizationHandler[] to process
authorization after authentication
- Returns:
Attributes - of authenticated user
- Throws:
NamingException - if any of the ldap operations fail
Copyright © 2003-2010 Virginia Tech. All Rights Reserved.