Package org.ldaptive.jaas
Class LdapDnAuthorizationModule
- java.lang.Object
-
- org.ldaptive.jaas.AbstractLoginModule
-
- org.ldaptive.jaas.LdapDnAuthorizationModule
-
- All Implemented Interfaces:
javax.security.auth.spi.LoginModule
public class LdapDnAuthorizationModule extends AbstractLoginModule
Provides a JAAS authentication hook into LDAP DNs. No authentication is performed by this module. The LDAP entry DN can be stored and shared with other JAAS modules.- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class org.ldaptive.jaas.AbstractLoginModule
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 Summary
Constructors Constructor Description LdapDnAuthorizationModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(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 booleanlogin(javax.security.auth.callback.NameCallback nameCb, javax.security.auth.callback.PasswordCallback passCb)Authenticates aSubjectwith the supplied callbacks.static voidmain(java.lang.String[] args)This provides command line access to this JAAS module.-
Methods inherited from class org.ldaptive.jaas.AbstractLoginModule
abort, clearState, commit, getCredentials, login, logout, storeCredentials
-
-
-
-
Method Detail
-
initialize
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)- Specified by:
initializein interfacejavax.security.auth.spi.LoginModule- Overrides:
initializein classAbstractLoginModule
-
login
protected boolean login(javax.security.auth.callback.NameCallback nameCb, javax.security.auth.callback.PasswordCallback passCb) throws javax.security.auth.login.LoginExceptionDescription copied from class:AbstractLoginModuleAuthenticates aSubjectwith the supplied callbacks.- Specified by:
loginin classAbstractLoginModule- Parameters:
nameCb- callback handler for subject's namepassCb- callback handler for subject's password- Returns:
- true if authentication succeeded, false to ignore this module
- Throws:
javax.security.auth.login.LoginException- if the authentication fails
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionThis provides command line access to this JAAS module.- Parameters:
args- command line arguments- Throws:
java.lang.Exception- if an error occurs
-
-