|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.auth.AbstractAuthenticator<T>
T - type of AuthenticatorConfigpublic abstract class AbstractAuthenticator<T extends AuthenticatorConfig>
AbstractAuthenticator provides basic functionality for
authenticating against an LDAP.
| Field Summary | |
|---|---|
protected T |
config
Authenticator configuration environment. |
protected org.apache.commons.logging.Log |
logger
Log for this class. |
| Constructor Summary | |
|---|---|
AbstractAuthenticator()
|
|
| Method Summary | |
|---|---|
protected boolean |
authenticateAndAuthorize(String dn,
Object credential,
AuthenticationResultHandler[] authResultHandler,
AuthorizationHandler[] authzHandler)
This will authenticate by binding to the LDAP with the supplied dn and credential. |
protected Attributes |
authenticateAndAuthorize(String dn,
Object credential,
boolean searchAttrs,
String[] retAttrs,
AuthenticationResultHandler[] authResultHandler,
AuthorizationHandler[] authzHandler)
This will authenticate by binding to the LDAP with the supplied dn and credential. |
void |
close()
This will close the connection on the underlying DN resolver. |
void |
setAuthenticatorConfig(T authConfig)
This will set the config parameters of this Authenticator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
protected T extends AuthenticatorConfig config
| Constructor Detail |
|---|
public AbstractAuthenticator()
| Method Detail |
|---|
public void setAuthenticatorConfig(T authConfig)
Authenticator.
authConfig - AuthenticatorConfig
protected boolean authenticateAndAuthorize(String dn,
Object credential,
AuthenticationResultHandler[] authResultHandler,
AuthorizationHandler[] authzHandler)
throws NamingException
authenticateAndAuthorize( String, Object, boolean,
String[], AuthenticationResultHandler[], AuthorizationHandler[]).
dn - String for bindcredential - Object for bindauthResultHandler - AuthenticationResultHandler[] to
post process authentication resultsauthzHandler - AuthorizationHandler[] to process
authorization after authentication
boolean - whether the bind succeeded
NamingException - if the authentication fails for any other reason
than invalid credentials
protected Attributes authenticateAndAuthorize(String dn,
Object credential,
boolean searchAttrs,
String[] retAttrs,
AuthenticationResultHandler[] authResultHandler,
AuthorizationHandler[] authzHandler)
throws NamingException
LdapConfig.getAuthtype() is set to 'none'. If retAttrs is null
and searchAttrs is true then all user attributes will be returned. If
retAttrs is an empty array and searchAttrs is true then no attributes will
be returned. This method throws AuthenticationException if authentication
fails and AuthorizationException if authorization fails.
dn - String for bindcredential - Object for bindsearchAttrs - boolean whether to perform attribute
searchretAttrs - String[] user attributes to returnauthResultHandler - AuthenticationResultHandler[] to
post process authentication resultsauthzHandler - AuthorizationHandler[] to process
authorization after authentication
Attribute - belonging to the supplied user, returns
null if searchAttrs is false
NamingException - if any of the ldap operations fail
AuthenticationException - if authentication fails
AuthorizationException - if authorization failspublic void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||