|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.websphere.objectgrid.security.plugins.builtins.KeyStoreLoginModule
public class KeyStoreLoginModule
The KeyStoreLoginModule is a keystore authentication login module based on JAAS authentication.
A login configuration should provide an option "keyStoreFile
" to
indicate where the keystore file is located. If the keyStoreFile
value contains a system property in the form, ${system.property}
,
it will be expanded to the value of the system property.
If an option "keyStoreFile
" is not provided, the default keystore
file name is "${java.home}${/}.keystore"
.
Here is a Login module configuration example:
KeyStoreLogin {
com.ibm.websphere.objectgrid.security.plugins.builtins.KeystoreLoginModule required
keyStoreFile="${user.dir}${/}security${/}.keystore";
};
This login module returns a principal of class javax.security.auth.x500.X500Principal.
LoginModule
Field Summary | |
---|---|
static String |
DEFAULT_KEY_STORE_FILE
The default key store file name |
static String |
KEY_STORE_FILE_PROPERTY_NAME
Key store file property name |
protected KeyStore |
keyStore
|
static String |
KEYSTORE_TYPE
Key store type. |
Constructor Summary | |
---|---|
KeyStoreLoginModule()
Creates a new KeyStoreLoginModule. |
Method Summary | |
---|---|
boolean |
abort()
Indicates the user is not accepted |
boolean |
commit()
Indicates the user is accepted. |
void |
initialize(Subject sub,
CallbackHandler callbackHandler,
Map mapSharedState,
Map mapOptions)
Initializes the login module. |
boolean |
login()
Authenticates a user based on the keystore file. |
boolean |
logout()
Logs the user out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_STORE_FILE_PROPERTY_NAME
public static final String KEYSTORE_TYPE
public static final String DEFAULT_KEY_STORE_FILE
protected KeyStore keyStore
Constructor Detail |
---|
public KeyStoreLoginModule()
Method Detail |
---|
public void initialize(Subject sub, CallbackHandler callbackHandler, Map mapSharedState, Map mapOptions)
initialize
in interface LoginModule
LoginModule.initialize(Subject, CallbackHandler, Map, Map)
public boolean login() throws LoginException
login
in interface LoginModule
LoginException
LoginModule.login()
public boolean commit() throws LoginException
This method is called only if the user is authenticated by all modules in the login configuration file. The principal objects will be added to the stored subject.
commit
in interface LoginModule
LoginException
- LoginException is thrown if the subject is readonly or if
any unrecoverable exceptions is encountered.LoginModule.commit()
public boolean abort() throws LoginException
abort
in interface LoginModule
LoginException
LoginModule.abort()
public boolean logout() throws LoginException
logout
in interface LoginModule
LoginException
LoginModule.logout()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |