|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.security.auth.spi.AbstractServerLoginModule
org.jboss.resource.security.AbstractPasswordCredentialLoginModule
org.jboss.resource.security.PBEIdentityLoginModule
public class PBEIdentityLoginModule
An example of how one could encrypt the database password for a jca
connection factory. The corresponding login config entry illustrates
the usage:
| Field Summary |
|---|
| Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
|---|
callbackHandler, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass |
| Constructor Summary | |
|---|---|
PBEIdentityLoginModule()
|
|
| Method Summary | |
|---|---|
boolean |
abort()
Method to abort the authentication process (phase 2). |
boolean |
commit()
Method to commit the authentication process (phase 2). |
protected Principal |
getIdentity()
Overriden by subclasses to return the Principal that corresponds to the user primary identity. |
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. |
boolean |
login()
Return false if there is no mcf, else return super.login(). |
static void |
main(String[] args)
Main entry point to encrypt a password using the hard-coded pass phrase |
| Methods inherited from class org.jboss.resource.security.AbstractPasswordCredentialLoginModule |
|---|
getMcf, getServer, logout, removeCredentials |
| Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule |
|---|
createGroup, createIdentity, getUnauthenticatedIdentity, getUseFirstPass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PBEIdentityLoginModule()
| Method Detail |
|---|
public void initialize(Subject subject,
CallbackHandler handler,
Map sharedState,
Map options)
AbstractServerLoginModule
initialize in interface LoginModuleinitialize in class AbstractPasswordCredentialLoginModulesubject - 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
AbstractPasswordCredentialLoginModule
login in interface LoginModulelogin in class AbstractPasswordCredentialLoginModuleLoginException - if an error occurs
public boolean commit()
throws LoginException
AbstractServerLoginModule
commit in interface LoginModulecommit in class AbstractServerLoginModuleLoginExceptionSubject;,
Group;public boolean abort()
AbstractServerLoginModule
abort in interface LoginModuleabort in class AbstractServerLoginModuleprotected Principal getIdentity()
AbstractServerLoginModule
getIdentity in class AbstractServerLoginModule
protected Group[] getRoleSets()
throws LoginException
AbstractServerLoginModule
getRoleSets in class AbstractServerLoginModuleLoginException
public static void main(String[] args)
throws Exception
args - - [0] = the password to encode
[1] = PBE password
[2] = PBE salt
[3] = PBE iterationCount
[4] = PBE algo
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||