|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.authentication.AuthenticationManager
public final class AuthenticationManager
This singleton manages all the authentication process in JCMS.
It is responsible to store and invoke all the AuthenticationHandler
.
Field Summary | |
---|---|
static String |
REVISION
|
Method Summary | |
---|---|
void |
addAuthenticationHandler(AuthenticationHandler authHdlr)
Add the specified AuthenticationHandler to the handlers collection already managed by the AuthenticationManager. |
SortedSet<AuthenticationHandler> |
getAuthenticationHandlerSet()
Retrieve the internal set of AuthenticationHandler
managed by the AuthenticationManager.Modify only if you are sure of what you do... |
boolean |
getDefaultPersistentValue()
Defined by value of property auth-mgr.persistent.default-value . |
static AuthenticationManager |
getInstance()
|
String |
getLoginParameter()
Retrieve the parameter name used for the user's login. Defined by value of property auth-mgr.login-param.login . |
String |
getOpLoginParameter()
Retrieve the parameter name used to indicate a login action is requested (login form submitted). Defined by value of property auth-mgr.login-param.op-login . |
String |
getPasswordParameter()
Retrieve the parameter name used for the user's password. Defined by value of property auth-mgr.login-param.password . |
String |
getPersistentParameter()
Retrieve the parameter name used for the user's persistent login preference. Defined by value of property auth-mgr.login-param.persistent . |
void |
init()
Initialize the AuthenticationManager. This method can be called multiple time during the lifetime of the site, for example on properties change. |
boolean |
isAuthenticationRequired()
Returns true if the authentication is required in this site. Defined by value of property channel.is-authentication-required . |
boolean |
isLoginCaseSensitive()
Returns true if login should be treated as sensitive (myLogin != mylogin). |
boolean |
isShowingPersistentOption()
Defined by value of property auth-mgr.persistent.show-option . |
LoginResult |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Locale userLocale)
Authenticate a member for each request. Invoke the authentication handler chain and return the authenticated Member. |
LoginResult |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userLang)
Deprecated. use login(HttpServletRequest, HttpServletResponse, Locale) |
Member |
login(String login,
String password)
Retrieve a member from a login/password pair. Current implementation invoke the authentication handler login chain with current servlet request if available otherwise with a fake request, and a fake response. |
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Locale userLocale,
Member loggedMember)
Logout the current loggedMember from this session. |
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String userLang,
Member loggedMember)
Deprecated. use logout(HttpServletRequest, HttpServletResponse, Locale, Member) |
void |
readOrdersFromProperties()
Read Authentication Handlers order from properties. |
void |
removeAuthenticationHandler(AuthenticationHandler authHdlr)
Remove the specified AuthenticationHandler from the handlers managed by the AuthenticationManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Method Detail |
---|
public static final AuthenticationManager getInstance()
public void init()
public void readOrdersFromProperties()
public void addAuthenticationHandler(AuthenticationHandler authHdlr)
authHdlr
- the AuthenticationHandler to be addedpublic void removeAuthenticationHandler(AuthenticationHandler authHdlr)
authHdlr
- the AuthenticationHandler to be removedpublic SortedSet<AuthenticationHandler> getAuthenticationHandlerSet()
AuthenticationHandler
managed by the AuthenticationManager.
AuthenticationHandler
public boolean isAuthenticationRequired()
channel.is-authentication-required
.
public boolean isLoginCaseSensitive()
channel.login-casesensitive
.
public boolean isShowingPersistentOption()
auth-mgr.persistent.show-option
.
public boolean getDefaultPersistentValue()
auth-mgr.persistent.default-value
.
public String getLoginParameter()
auth-mgr.login-param.login
.
public String getPasswordParameter()
auth-mgr.login-param.password
.
public String getPersistentParameter()
auth-mgr.login-param.persistent
.
public String getOpLoginParameter()
auth-mgr.login-param.op-login
.
public Member login(String login, String password) throws IOException
login
- the user loginpassword
- the user's clear text password
Member
, (or null on error)
IOException
- if the login operation could not be performed due to IO problem (HTTP headers in response, cookie error, ...)public LoginResult login(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userLang) throws IOException
login(HttpServletRequest, HttpServletResponse, Locale)
request
- the current HttpServletRequest being processedresponse
- the HttpServletResponse bound to current requestuserLang
- the current language guessed from browser preference or session
Member
IOException
- if the login operation could not be performed due to IO problem (HTTP headers in response, cookie error, ...)public LoginResult login(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Locale userLocale) throws IOException
request
- the current HttpServletRequest being processedresponse
- the HttpServletResponse bound to current requestuserLocale
- the current Locale guessed from browser preference or session
Member
IOException
- if the login operation could not be performed due to IO problem (HTTP headers in response, cookie error, ...)public void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String userLang, Member loggedMember) throws IOException
logout(HttpServletRequest, HttpServletResponse, Locale, Member)
request
- the current HttpServletRequest being processedresponse
- the HttpServletResponse bound to current requestuserLang
- the current language guessed from browser preference or sessionloggedMember
- the member currently logged in
IOException
- if the logout operation could not be performed due to IO problem (HTTP headers in response, cookie error, ...)public void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Locale userLocale, Member loggedMember) throws IOException
request
- the current HttpServletRequest being processedresponse
- the HttpServletResponse bound to current requestuserLocale
- the current Locale guessed from browser preference or sessionloggedMember
- the member currently logged in
IOException
- if the logout operation could not be performed due to IO problem (HTTP headers in response, cookie error, ...)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |