public class LdapLoginModule extends AbstractLoginModule
| Modifier and Type | Field and Description |
|---|---|
private Authenticator |
auth
Authenticator to use against the LDAP.
|
private AuthenticatorFactory |
authenticatorFactory
Factory for creating authenticators with JAAS options.
|
private AuthenticationRequest |
authRequest
Authentication request to use for authentication.
|
private java.lang.String[] |
userRoleAttribute
User attribute to add to role data.
|
callbackHandler, clearPass, commitSuccess, credentials, defaultRole, logger, LOGIN_DN, LOGIN_NAME, LOGIN_PASSWORD, loginSuccess, principalGroupName, principals, roleGroupName, roles, setLdapCredential, setLdapDnPrincipal, setLdapPrincipal, sharedState, storePass, subject, tryFirstPass, useFirstPass| Constructor and Description |
|---|
LdapLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map<java.lang.String,?> sharedState,
java.util.Map<java.lang.String,?> options) |
protected boolean |
login(javax.security.auth.callback.NameCallback nameCb,
javax.security.auth.callback.PasswordCallback passCb)
Authenticates a
Subject with the supplied callbacks. |
static void |
main(java.lang.String[] args)
This provides command line access to this JAAS module.
|
abort, clearState, commit, getCredentials, login, logout, storeCredentialsprivate java.lang.String[] userRoleAttribute
private AuthenticatorFactory authenticatorFactory
private Authenticator auth
private AuthenticationRequest authRequest
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map<java.lang.String,?> sharedState,
java.util.Map<java.lang.String,?> options)
initialize in interface javax.security.auth.spi.LoginModuleinitialize in class AbstractLoginModuleprotected boolean login(javax.security.auth.callback.NameCallback nameCb,
javax.security.auth.callback.PasswordCallback passCb)
throws javax.security.auth.login.LoginException
AbstractLoginModuleSubject with the supplied callbacks.login in class AbstractLoginModulenameCb - callback handler for subject's namepassCb - callback handler for subject's passwordjavax.security.auth.login.LoginException - if the authentication failspublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - command line argumentsjava.lang.Exception - if an error occurs