|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.security.LoginList
@Singleton public class LoginList
Used to allow multiple login types in a priority list.
| Field Summary |
|---|
| Fields inherited from interface com.caucho.security.Login |
|---|
LOGIN_PASSWORD, LOGIN_USER_NAME, LOGIN_USER_PRINCIPAL |
| Constructor Summary | |
|---|---|
LoginList()
|
|
| Method Summary | |
|---|---|
void |
add(Login login)
Adds the next login in the list. |
Authenticator |
getAuthenticator()
Returns the configured authenticator |
java.lang.String |
getAuthType()
Returns the authentication type. |
java.util.ArrayList<Login> |
getLoginList()
Returns the login list. |
java.security.Principal |
getUserPrincipal(HttpServletRequest request)
Returns the Principal associated with the current request. |
boolean |
isLoginUsedForRequest(HttpServletRequest request)
Returns true if the login is used for this request |
boolean |
isPasswordBased()
Returns true if username and password based authentication is supported. |
boolean |
isUserInRole(java.security.Principal user,
java.lang.String role)
Returns true if the current user plays the named role. |
java.security.Principal |
login(HttpServletRequest request,
HttpServletResponse response,
boolean isFail)
Logs a user in. |
void |
logout(java.security.Principal user,
HttpServletRequest request,
HttpServletResponse response)
Logs the user out from the given request. |
void |
sessionInvalidate(HttpSession session,
boolean isTimeout)
Called when the session invalidates. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LoginList()
| Method Detail |
|---|
public void add(Login login)
public java.util.ArrayList<Login> getLoginList()
public java.lang.String getAuthType()
getAuthType is called
by HttpServletRequest.getAuthType.
getAuthType in interface Loginpublic Authenticator getAuthenticator()
getAuthenticator in interface Loginpublic boolean isLoginUsedForRequest(HttpServletRequest request)
isLoginUsedForRequest in interface Loginpublic java.security.Principal getUserPrincipal(HttpServletRequest request)
getUserPrincipal in interface Loginrequest - servlet request
public java.security.Principal login(HttpServletRequest request,
HttpServletResponse response,
boolean isFail)
authenticate
sets the reponse error page and returns null.
login in interface Loginrequest - servlet requestresponse - servlet response for a failed authentication.isFail - true if the authorization has failed
public boolean isPasswordBased()
isPasswordBased in interface LoginBasicLogin
public boolean isUserInRole(java.security.Principal user,
java.lang.String role)
isUserInRole is called in response to the
HttpServletRequest.isUserInRole call.
isUserInRole in interface Loginuser - the logged in userrole - the role to check
public void logout(java.security.Principal user,
HttpServletRequest request,
HttpServletResponse response)
Since there is no servlet API for logout, this must be called directly from user code. Resin stores the web-app's login object in the ServletContext attribute "caucho.login".
logout in interface Login
public void sessionInvalidate(HttpSession session,
boolean isTimeout)
sessionInvalidate in interface Loginpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||