|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoginService
This portlet service can be used to perform a login with user and password.
It can be retrieved with the
LoginHome
interface.
Field Summary | |
---|---|
static java.lang.String |
DO_DELETE_REMEMBER_ME_COOKIE
This constant must be used as key to store a Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject) method of the service to
pass in the information whether an existing remember me cookie of the
current user should be removed or not. |
static java.lang.String |
DO_RESUME_SESSION_KEY
This constant must be used as key to store a Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject) method of the service to
pass in the information whether the session should be resumed or not. |
static java.lang.String |
DO_SET_REMEMBER_ME_COOKIE
This constant must be used as key to store a Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject) method of the service to
pass in the information whether a cookie to remember the current user
should be set or not. |
Method Summary | |
---|---|
boolean |
checkPassword(java.lang.String userID,
char[] password)
This method checks whether the supplied username and password is valid against the current WAS user registry. |
boolean |
isFormAuthenticated(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse)
This method indicates whether the current portal user has been authenticated using the default login mechanism of portal . |
void |
login(java.lang.String userID,
char[] password,
java.util.Map portalLoginContext,
javax.security.auth.Subject subject)
This method triggers a Portal login. |
Field Detail |
---|
static final java.lang.String DO_RESUME_SESSION_KEY
Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject)
method of the service to
pass in the information whether the session should be resumed or not. If
the boolean value of the object is "true", the default portal login logic
tries to resume the last session of the user after a successful login. If
this property is not set or set to an invalid value, it is by default
considered as "false".
static final java.lang.String DO_SET_REMEMBER_ME_COOKIE
Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject)
method of the service to
pass in the information whether a cookie to remember the current user
should be set or not. If the boolean value of the object is "true", the
default portal login logic sets the remember me cookie. If this property
is not set or set to an invalid value, it is by default considered as
"false".
static final java.lang.String DO_DELETE_REMEMBER_ME_COOKIE
Boolean
object in the portal login context map passed in to the
login(String, char[], Map, Subject)
method of the service to
pass in the information whether an existing remember me cookie of the
current user should be removed or not. If the boolean value of the object
is "true", the default portal login logic will remove the remember me
cookie. If this property is not set or set to an invalid value, it is by
default considered as "false".
Method Detail |
---|
void login(java.lang.String userID, char[] password, java.util.Map portalLoginContext, javax.security.auth.Subject subject) throws javax.security.auth.login.LoginException, com.ibm.websphere.security.WSSecurityException, PasswordInvalidException, UserIDInvalidException, AuthenticationFailedException, AuthenticationException, SessionTimeOutException, PortletLoginDisabledException, UserAlreadyLoggedInException, SystemLoginException, LoginException
userID
- The user id of the user.password
- The password of the user represented as an array of
characters.portalLoginContext
- Map that should contain a Boolean value for the
DO_RESUME_SESSION_KEY
.subject
- A security subject that can be passed along to the WAS login
modules, can be null if not needed.
javax.security.auth.login.LoginException
- Thrown if WAS login failed.
com.ibm.websphere.security.WSSecurityException
- Thrown if WAS login failed.
PasswordInvalidException
- Thrown if the password is null or empty.
UserIDInvalidException
- Thrown if the user id is null or empty.
AuthenticationFailedException
- Thrown if the Authentication failed for some other reason.
AuthenticationException
- Thrown if the Authentication failed for some other reason.
SessionTimeOutException
- For future use: Thrown if the user did not log out the last
time he accessed Portal. Currently, this exception is never
thrown in this service, as the underlying implementation
enforces a logout including a redirect to the error screen or
the specified logout redirect URL.
PortletLoginDisabledException
- Thrown if the authentication.screen.login property
has been set to "true" in the properties of the Portal
Authentication Service.
UserAlreadyLoggedInException
- Thrown if the user is already logged in.
SystemLoginException
- Thrown when an inrecoverable problem occurred within Portal
during Login.
LoginException
- Thrown if the Login failed for some other reason. Superclass
for all Portal Login exceptions.boolean isFormAuthenticated(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse) throws SecurityException
true
if the user has been authenticated using the
login form,false
if the user has been authenticated using
another authentication mechanism, e.g. remember me cookie authentication.
portletRequest
- The current portlet request.portletResponse
- The current portlet response.
boolean
revealing the user's authentication
status concerning form-based authentication.
SecurityException
- If the verification of the default authentication level fails
because of an exceptional state.boolean checkPassword(java.lang.String userID, char[] password) throws PasswordInvalidException, UserIDInvalidException, AuthenticationFailedException
true
if the username and password combination is correct
userID
- The user id of the user.password
- The password of the user represented as an array of
characters.
true
if the username and password are valid or throws an
Exception if not
PasswordInvalidException
- Thrown if the password is null or empty.
UserIDInvalidException
- Thrown if the user id is null or empty.
AuthenticationFailedException
- Thrown if the authentication failed for some other reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |