public class ConfiguredIdentityLoginModule extends AbstractPasswordCredentialLoginModule
org.jboss.security.SimplePrincipal.
If no principal option is specified a principal with the name of 'guest' is used.
SimpleGroup
,
SimplePrincipal
callbackHandler, jbossModuleName, log, loginOk, options, principalClassModuleName, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass
Constructor and Description |
---|
ConfiguredIdentityLoginModule() |
Modifier and Type | Method and Description |
---|---|
protected Principal |
getIdentity()
Overriden by subclasses to return the Principal that corresponds to
the user primary identity.
|
protected Group[] |
getRoleSets()
This method simply returns an empty array of Groups which means that
no role based permissions are assigned.
|
void |
initialize(Subject subject,
CallbackHandler handler,
Map<String,?> sharedState,
Map<String,?> options)
Initialize the login module.
|
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.
|
logout, removeCredentials
abort, addValidOptions, checkOptions, commit, createGroup, createIdentity, getCallerPrincipalGroup, getUnauthenticatedIdentity, getUseFirstPass
public void initialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)
AbstractServerLoginModule
initialize
in interface LoginModule
initialize
in class AbstractServerLoginModule
subject
- 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
AbstractServerLoginModule
login
in interface LoginModule
login
in class AbstractServerLoginModule
LoginException
protected Principal getIdentity()
AbstractServerLoginModule
getIdentity
in class AbstractServerLoginModule
protected Group[] getRoleSets() throws LoginException
getRoleSets
in class AbstractServerLoginModule
LoginException
Copyright © 2018 JBoss by Red Hat. All rights reserved.