public class AdvancedLdapLoginModule extends CommonLoginModule
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowEmptyPassword |
protected String |
baseCtxDN |
protected String |
baseFilter |
protected String |
bindAuthentication |
protected String |
bindCredential |
protected String |
bindDn |
protected String |
jaasSecurityDomain |
protected boolean |
recurseRoles |
protected String |
referralUserAttributeIDToCheck |
protected String |
roleAttributeID |
protected boolean |
roleAttributeIsDN |
protected String |
roleFilter |
protected String |
roleNameAttributeID |
protected String |
rolesCtxDN |
protected SearchControls |
roleSearchControls |
protected int |
searchTimeLimit |
protected SearchControls |
userSearchControls |
callbackHandler, jbossModuleName, log, loginOk, options, principalClassModuleName, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass| Constructor and Description |
|---|
AdvancedLdapLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
authenticate(String userDN) |
protected String |
canonicalize(String searchResult) |
protected LdapContext |
constructLdapContext(String namingProviderURL,
String dn,
Object credential,
String authentication) |
protected Properties |
createBaseProperties() |
protected String |
findUserDN(LdapContext ctx) |
protected Group[] |
getRoleSets()
Overriden by subclasses to return the Groups that correspond to the
to the role sets assigned to the user.
|
void |
initialize(Subject subject,
CallbackHandler handler,
Map sharedState,
Map options)
Initialize the login module.
|
protected Boolean |
innerLogin() |
protected void |
loadRoleByRoleNameAttributeID(LdapContext searchContext,
String roleDN) |
boolean |
login()
Looks for javax.security.auth.login.name and javax.security.auth.login.password
values in the sharedState map if the useFirstPass option was true and returns
true if they exist.
|
protected void |
obtainRole(LdapContext searchContext,
String dn,
SearchResult sr) |
protected void |
recurseRolesSearch(LdapContext searchContext,
String roleDN) |
protected void |
rolesSearch(LdapContext searchContext,
String dn) |
protected void |
traceLdapEnv(Properties env) |
getCredential, getIdentity, processIdentityAndCredential, setIdentityabort, addValidOptions, checkOptions, commit, createGroup, createIdentity, getCallerPrincipalGroup, getUnauthenticatedIdentity, getUseFirstPass, logoutprotected String bindAuthentication
protected String bindDn
protected String bindCredential
protected String jaasSecurityDomain
protected String baseCtxDN
protected String baseFilter
protected int searchTimeLimit
protected SearchControls userSearchControls
protected String rolesCtxDN
protected String roleFilter
protected boolean recurseRoles
protected SearchControls roleSearchControls
protected String roleAttributeID
protected boolean roleAttributeIsDN
protected String roleNameAttributeID
protected String referralUserAttributeIDToCheck
protected boolean allowEmptyPassword
public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
AbstractServerLoginModuleinitialize in interface LoginModuleinitialize in class AbstractServerLoginModulesubject - the Subject to update after a successful login.handler - the CallbackHandler that will be used to obtain the
the user identity and credentials.sharedState - a Map shared between all configured login module instancesoptions - the parameters passed to the login module.public boolean login()
throws LoginException
AbstractServerLoginModulelogin in interface LoginModulelogin in class AbstractServerLoginModuleLoginExceptionprotected Group[] getRoleSets() throws LoginException
AbstractServerLoginModulegetRoleSets in class AbstractServerLoginModuleLoginExceptionprotected Boolean innerLogin() throws LoginException
LoginExceptionprotected LdapContext constructLdapContext(String namingProviderURL, String dn, Object credential, String authentication) throws LoginException
LoginExceptionprotected Properties createBaseProperties()
protected String findUserDN(LdapContext ctx) throws LoginException
LoginExceptionprotected void authenticate(String userDN) throws LoginException
LoginExceptionprotected void rolesSearch(LdapContext searchContext, String dn) throws LoginException
LoginExceptionprotected void obtainRole(LdapContext searchContext, String dn, SearchResult sr) throws NamingException, LoginException
NamingExceptionLoginExceptionprotected void loadRoleByRoleNameAttributeID(LdapContext searchContext, String roleDN)
protected void recurseRolesSearch(LdapContext searchContext, String roleDN) throws LoginException
LoginExceptionprotected void traceLdapEnv(Properties env)
Copyright © 2018 JBoss by Red Hat. All rights reserved.