当前页面:
在线文档首页 >
JBoss 3.2.7 messaging API Documentation 英文版文档
DynamicLoginModule (JBoss Messaging API) - JBoss 3.2.7 messaging API Documentation 英文版文档
org.jboss.mq.sm.file
Class DynamicLoginModule
java.lang.Object
org.jboss.security.auth.spi.AbstractServerLoginModule
org.jboss.security.auth.spi.UsernamePasswordLoginModule
org.jboss.mq.sm.file.DynamicLoginModule
- All Implemented Interfaces:
- LoginModule
- public class DynamicLoginModule
- extends org.jboss.security.auth.spi.UsernamePasswordLoginModule
JAAS LoginModule that is backed by the DynamicStateManager.
Must have the attribute sm.objectname set,
and may have the unauthenticatedIdentity set to some value.
- Version:
- $Revision: 1.1.4.3 $
- Author:
- Peter Antman
Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
callbackHandler, log, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass |
Method Summary |
protected Group[] |
getRoleSets()
Overriden by subclasses to return the Groups that correspond to the
to the role sets assigned to the user. |
protected String |
getUsersPassword()
Overriden to return an empty password string as typically one cannot
obtain a user's password. |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
|
boolean |
login()
Check we have contact to a state manager. |
protected boolean |
validatePassword(String inputPassword,
String expectedPassword)
Validate the password againts the state manager. |
Methods inherited from class org.jboss.security.auth.spi.UsernamePasswordLoginModule |
createPasswordHash, getCredentials, getIdentity, getUnauthenticatedIdentity, getUsername, getUsernameAndPassword |
Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
abort, commit, createGroup, createIdentity, getUseFirstPass, logout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicLoginModule
public DynamicLoginModule()
initialize
public void initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
login
public boolean login()
throws LoginException
- Check we have contact to a state manager.
- Throws:
LoginException
getUsersPassword
protected String getUsersPassword()
throws LoginException
- Overriden to return an empty password string as typically one cannot
obtain a user's password. We also override the validatePassword so
this is ok.
- Returns:
- and empty password String
- Throws:
LoginException
validatePassword
protected boolean validatePassword(String inputPassword,
String expectedPassword)
- Validate the password againts the state manager.
- Parameters:
inputPassword
- the password to validate.expectedPassword
- ignored
getRoleSets
protected Group[] getRoleSets()
throws LoginException
- Overriden by subclasses to return the Groups that correspond to the
to the role sets assigned to the user. Subclasses should create at
least a Group named "Roles" that contains the roles assigned to the user.
A second common group is "CallerPrincipal" that provides the application
identity of the user rather than the security domain identity.
Only a Roles Group is returned.
- Returns:
- Group[] containing the sets of roles
- Throws:
LoginException
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.