|
SAP J2EE Engine Version 6.40 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sap.engine.interfaces.security.auth.AbstractLoginModule
Does login module common work. Here is an example how it can be used:
public class TemplateLoginModule extends com.sap.engine.interfaces.security.auth.AbstractLoginModule {
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options) {
super.initialize (subject, callbackHandler, sharedState, options);
...
}
public boolean login() throws javax.security.auth.login.LoginException {
...
< Retrieve the user credentials via the callback handler. >
...
// After the user name is known, an update of the user info from the persistance should be made.
// The operation must be done before the user credentils checks.
// This method also checks the user name so that if user with such name does not exist in
// the active user store, a java.lang.SecurityException is thrown.
refreshUserInfo(
| Field Summary | |
protected static java.lang.String |
NAME
|
static java.lang.String |
PRINCIPAL
|
| Constructor Summary | |
AbstractLoginModule()
|
|
| Method Summary | |
abstract boolean |
abort()
|
boolean |
changePasswordIfNeeded(java.lang.String userName,
javax.security.auth.callback.CallbackHandler callbackHandler)
Deprecated. This functionality is moved to the login context. |
boolean |
changePasswordIfNeeded(com.sap.engine.interfaces.security.userstore.context.UserContext userContext,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
javax.security.auth.callback.CallbackHandler callbackHandler)
Deprecated. This functionality is moved to the login context. |
boolean |
changePasswordIfNeeded(java.security.cert.X509Certificate certificate,
javax.security.auth.callback.CallbackHandler callbackHandler)
Deprecated. This functionality is moved to the login context. |
protected void |
checkUserLockStatus(java.lang.String userName)
Deprecated. This functionality is moved to the login context. |
protected void |
checkUserLockStatus(com.sap.engine.interfaces.security.userstore.context.UserContext userContext,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo)
Deprecated. This functionality is moved to the login context. |
protected void |
checkUserLockStatus(java.security.cert.X509Certificate certificate)
Deprecated. This functionality is moved to the login context. |
abstract boolean |
commit()
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
Initialises its shared state. |
boolean |
isUserAccountExpired(java.lang.String userName)
Deprecated. This functionality is moved to the login context. |
boolean |
isUserAccountExpired(com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
com.sap.engine.interfaces.security.userstore.context.UserContext userContext)
Deprecated. This functionality is moved to the login context. |
abstract boolean |
login()
|
protected void |
logMessage(byte severity,
java.lang.String message)
Writes a message to the log sistem, using the category and location, specified in security service. |
abstract boolean |
logout()
|
protected void |
logThrowable(byte severity,
java.lang.Throwable throwable)
Logs an exception, using the category and location, specified in security service. |
void |
refreshUserInfo(java.lang.String userName)
Refresh the specified user's entry in the user store cache. |
static void |
setLoginModuleHelper(com.sap.engine.interfaces.security.auth.LoginModuleHelper helper)
Inicialization method that is used only in security service. |
protected void |
throwNewLoginException(java.lang.String message)
This method is for throwing exceptions if the user credentials are not correct. |
protected void |
throwNewLoginException(java.lang.String message,
byte cause)
This method is for throwing exceptions if the user credentials are not correct. |
protected void |
throwUserLoginException(java.lang.Exception exception)
This method is for exceptions caused by the caller. |
protected void |
throwUserLoginException(java.lang.Exception exception,
byte cause)
This method is for exceptions caused by the caller. |
protected void |
writeLogonStatistics(boolean successful,
java.lang.String userName,
long timeStamp,
java.util.Map sharedState)
Deprecated. This functionality is moved to the login context. |
void |
writeLogonStatistics(boolean successful,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
long timeStamp,
java.util.Map sharedState)
Deprecated. This functionality is moved to the login context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String PRINCIPAL
protected static final java.lang.String NAME
| Constructor Detail |
public AbstractLoginModule()
| Method Detail |
public static void setLoginModuleHelper(com.sap.engine.interfaces.security.auth.LoginModuleHelper helper)
helper - - helping class that provides the functionality of the other methods.
protected void checkUserLockStatus(java.lang.String userName)
throws javax.security.auth.login.LoginException
userName - - the name of the user whose lock status is being chackedjavax.security.auth.login.LoginException - - if the user is locked. The exception is always with message "User is locked."
protected void checkUserLockStatus(java.security.cert.X509Certificate certificate)
throws javax.security.auth.login.LoginException
certificate - - the certificate that identifies the user whose lock status is being chackedjavax.security.auth.login.LoginException - - if the user is locked. The exception is always with message "User is locked."
protected void checkUserLockStatus(com.sap.engine.interfaces.security.userstore.context.UserContext userContext,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo)
throws javax.security.auth.login.LoginException
userContext - - the user context of the active user storeuserInfo - - the user info of the user whose lock status is being chackedjavax.security.auth.login.LoginException - - if the user is locked. The exception is always with message "User is locked."
public boolean changePasswordIfNeeded(java.lang.String userName,
javax.security.auth.callback.CallbackHandler callbackHandler)
throws javax.security.auth.login.LoginException
userName - - the name of the user whose password validity is being chackedcallbackHandler - - the callback handler to handle the callbacksjavax.security.auth.login.LoginException - - if the supplied new password is not acceptable.
public boolean changePasswordIfNeeded(java.security.cert.X509Certificate certificate,
javax.security.auth.callback.CallbackHandler callbackHandler)
throws javax.security.auth.login.LoginException
certificate - - the certificate of the user whose password validity is being chackedcallbackHandler - - the callback handler to handle the callbacksjavax.security.auth.login.LoginException - - if the supplied new password is not acceptable.
public boolean changePasswordIfNeeded(com.sap.engine.interfaces.security.userstore.context.UserContext userContext,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
javax.security.auth.callback.CallbackHandler callbackHandler)
throws javax.security.auth.login.LoginException
userContext - - the user context of the active user storeuserInfo - - the user info of the user whose password validity is being chackedcallbackHandler - - the callback handler to handle the callbacksjavax.security.auth.login.LoginException - - if the supplied new password is not acceptable.
public boolean isUserAccountExpired(java.lang.String userName)
throws javax.security.auth.login.LoginException
userName - - the name of the user.javax.security.auth.login.LoginException - - if some exception occurs in the process of verification.
public boolean isUserAccountExpired(com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
com.sap.engine.interfaces.security.userstore.context.UserContext userContext)
throws javax.security.auth.login.LoginException
userInfo - - the name of the user.userContext - - the user context of the active user storejavax.security.auth.login.LoginException - - if some exception occurs in the process of verification.
public void refreshUserInfo(java.lang.String userName)
throws javax.security.auth.login.LoginException
userName - the name of the user.javax.security.auth.login.LoginException - if the refresh failed.
protected void writeLogonStatistics(boolean successful,
java.lang.String userName,
long timeStamp,
java.util.Map sharedState)
successful - - specifies if the login is successfuluserName - - the name of the user who has attempred to login himself.timeStamp - - the time when the user has attempted to login written in millisecondssharedState - - the shared state map of the login module which has procesed the login
public void writeLogonStatistics(boolean successful,
com.sap.engine.interfaces.security.userstore.context.UserInfo userInfo,
long timeStamp,
java.util.Map sharedState)
successful - - specifies if the login is successfuluserInfo - - the user info of the user who has attempred to login himself.timeStamp - - the time when the user has attempted to login written in millisecondssharedState - - the shared state map of the login module which has procesed the login
protected void logMessage(byte severity,
java.lang.String message)
severity - - the log level of the messagemessage - - the message to be logged
protected void logThrowable(byte severity,
java.lang.Throwable throwable)
severity - - the log levelthrowable - - the exception to be logged
protected void throwNewLoginException(java.lang.String message)
throws javax.security.auth.login.LoginException
message - - the message to be logged.javax.security.auth.login.LoginException - - always throws LoginException with message "Access Denied!"
protected void throwNewLoginException(java.lang.String message,
byte cause)
throws javax.security.auth.login.LoginException
message - - the message to be logged.javax.security.auth.login.LoginException - - always throws LoginException with message "Access Denied!"
protected void throwUserLoginException(java.lang.Exception exception)
throws javax.security.auth.login.LoginException
exception - - the exception to be logged.javax.security.auth.login.LoginException - - always throws LoginException with message "Access Denied!"
protected void throwUserLoginException(java.lang.Exception exception,
byte cause)
throws javax.security.auth.login.LoginException
exception - - the exception to be logged.javax.security.auth.login.LoginException - - always throws LoginException with message "Access Denied!"
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
initialize in interface javax.security.auth.spi.LoginModule
public abstract boolean login()
throws javax.security.auth.login.LoginException
login in interface javax.security.auth.spi.LoginModule
public abstract boolean commit()
throws javax.security.auth.login.LoginException
commit in interface javax.security.auth.spi.LoginModule
public abstract boolean abort()
throws javax.security.auth.login.LoginException
abort in interface javax.security.auth.spi.LoginModule
public abstract boolean logout()
throws javax.security.auth.login.LoginException
logout in interface javax.security.auth.spi.LoginModule
|
SAP J2EE Engine Version 6.40 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||