public class SPNEGOLoginModule extends CommonLoginModule
callbackHandler, log, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass
Constructor and Description |
---|
SPNEGOLoginModule() |
Modifier and Type | Method and Description |
---|---|
protected Principal |
createIdentity(String username)
Utility method to create a Principal for the given username.
|
protected Principal |
getIdentityFromSubject(Subject userSubject)
Obtaining identity from subject.
|
protected Group[] |
getRoleSets()
Overriden by subclasses to return the Groups that correspond to the
to the role sets assigned to the user.
|
protected Subject |
getServerSubject() |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
Initialize the login module.
|
protected Object |
innerLogin() |
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.
|
getCredential, getIdentity, processIdentityAndCredential, setIdentity
abort, addValidOptions, checkOptions, commit, createGroup, getCallerPrincipalGroup, getUnauthenticatedIdentity, getUseFirstPass, logout
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
AbstractServerLoginModule
initialize
in interface LoginModule
initialize
in class AbstractServerLoginModule
subject
- the Subject to update after a successful login.callbackHandler
- 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 Object innerLogin() throws LoginException
LoginException
protected Principal getIdentityFromSubject(Subject userSubject) throws LoginException
userSubject
- subjectLoginException
protected Principal createIdentity(String username) throws Exception
AbstractServerLoginModule
createIdentity
in class AbstractServerLoginModule
username
- the name of the principalException
- thrown if the custom principal type cannot be created.protected Group[] getRoleSets() throws LoginException
AbstractServerLoginModule
getRoleSets
in class AbstractServerLoginModule
LoginException
protected Subject getServerSubject() throws LoginException
LoginException
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.