|
IBM WebSphere Extended Deployment (XD)TM, Release 6.1 ObjectGrid API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.websphere.objectgrid.security.plugins.builtins.LDAPLoginModule
public class LDAPLoginModule
This LDAPLoginModule authenticates a user name and password to the configured LDAP server.
A login configuration should provide at least the following two options:
Here is a Login module configuration example used by the sample LDAPAuthenticator:
LDAPLogin {
com.ibm.websphere.objectgrid.security.plugins.builtins.LDAPLoginModule required
providerURL="ldap://bluepages.ibm.com:389/"
factoryClass="com.sun.jndi.ldap.LdapCtxFactory"
debug=true;
};
The providerURL points to the IBM bluepages LDAP server with the port number
389. The initial context factory is com.sun.jndi.ldap.LdapCtxFactory.
LoginModule| Field Summary | |
|---|---|
static java.lang.String |
FACTORY_CLASS
LDAP context factory implementation class property name |
static java.lang.String |
PROVIDER_URL
LDAP server provider URL property name |
| Constructor Summary | |
|---|---|
LDAPLoginModule()
|
|
| Method Summary | |
|---|---|
boolean |
abort()
Called if the LoginContext's overall authentication failed. |
boolean |
commit()
Called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded). |
void |
initialize(javax.security.auth.Subject _subject,
javax.security.auth.callback.CallbackHandler _callbackHandler,
java.util.Map _sharedState,
java.util.Map _options)
Initializes this LoginModule. |
boolean |
login()
Authenticates the user by a user name and password. |
boolean |
logout()
Logs out the user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROVIDER_URL
public static final java.lang.String FACTORY_CLASS
| Constructor Detail |
|---|
public LDAPLoginModule()
| Method Detail |
|---|
public void initialize(javax.security.auth.Subject _subject,
javax.security.auth.callback.CallbackHandler _callbackHandler,
java.util.Map _sharedState,
java.util.Map _options)
LoginModule.
initialize in interface javax.security.auth.spi.LoginModule_subject - the Subject to be authenticated._callbackHandler - a CallbackHandler for communicating
with the end user (prompting for user names and
passwords, for example)._sharedState - shared LoginModule state._options - options specified in the login
Configuration for this particular
LoginModule.
public boolean login()
throws javax.security.auth.login.LoginException
login in interface javax.security.auth.spi.LoginModuleLoginModule
should not be ignored.
javax.security.auth.login.FailedLoginException - if the authentication fails.
javax.security.auth.login.LoginException - if this LoginModule
is unable to perform the authentication.
public boolean commit()
throws javax.security.auth.login.LoginException
If this LoginModule's own authentication attempt succeeded (checked by
retrieving the private state saved by the login method),
this method associates a SimpleUserPrincipal and
SimpleDeptPrincipal with the Subject located in
the LoginModule. If this LoginModule's own
authentication attempted failed, this method removes
any state that was originally saved.
commit in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the commit fails.
public boolean abort()
throws javax.security.auth.login.LoginException
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login and commit methods),
then this method cleans up any state that was originally saved.
abort in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the abort fails.
public boolean logout()
throws javax.security.auth.login.LoginException
This method removes the SamplePrincipal
that was added by the commit method.
logout in interface javax.security.auth.spi.LoginModuleLoginModule
should not be ignored.
javax.security.auth.login.LoginException - if the logout fails.
|
IBM WebSphere Extended Deployment (XD)TM, Release 6.1 ObjectGrid API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||