|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.authentication.AuthenticationContext
public final class AuthenticationContext
Object used by AuthenticationHandler
when implementing
AuthenticationHandler.login(AuthenticationContext)
or AuthenticationHandler.logout(AuthenticationContext)
Use the AuthenticationContext to :
AuthenticationHandler
Field Summary | |
---|---|
protected static Channel |
channel
|
static String |
REVISION
|
Method Summary | |
---|---|
void |
doChain()
Causes the next handler in the chain to be invoked, or if the calling handler is the last handler in the chain, end the chain invokation. |
Member |
getLoggedMember()
Retrieve the member that was previously authenticated by previous AuthenticationHandler of the chain. |
String |
getLogin()
Return the login received from the form. |
String |
getPassword()
Return the clear text password received from the form. |
javax.servlet.http.HttpServletRequest |
getRequest()
Return the current HttpServletRequest available for this authentication. |
javax.servlet.http.HttpServletResponse |
getResponse()
Return the current HttpServletResponse available for this authentication. |
String |
getUserLang()
Return the current user language guessed from browser preference or session. |
boolean |
isCredentialProvided()
Checks if the credential (login/password) have been provided. |
boolean |
isLogged()
Checks if a member is already logged in or if any authentication handler has logged a member, during the chain invokation, till the call to this method. |
boolean |
isPersistent()
Return whether a persistent authentication was asked by the user in the login form. |
void |
sendRedirect(String url)
Redirect to the given url, using a 303 (HttpServletResponse.SC_SEE_OTHER) status code. |
void |
setErrorMsg(String key)
Set JCMS error message for current request (displayed through doMessageBox.jsp) |
void |
setInformationMsg(String key)
Set JCMS information message for current request (displayed through doMessageBox.jsp) |
void |
setLoggedMember(Member mbr)
Set the member that will be authenticated at the end of this login chain. |
void |
setWarningMsg(String key)
Set JCMS warning message for current request (displayed through doMessageBox.jsp) |
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
protected static final Channel channel
Method Detail |
---|
public void doChain() throws IOException
IOException
public javax.servlet.http.HttpServletRequest getRequest()
AuthenticationManager.login(String, String)
.
public javax.servlet.http.HttpServletResponse getResponse()
AuthenticationManager.login(String, String)
.
public String getUserLang()
public String getLogin()
isCredentialProvided()
returns false.
public String getPassword()
isCredentialProvided()
returns false.
public boolean isPersistent()
isCredentialProvided()
returns false.
public boolean isCredentialProvided()
public void setLoggedMember(Member mbr)
mbr
- the mbr to authenticate.public Member getLoggedMember()
AuthenticationHandler
of the chain.
public boolean isLogged()
public final void setInformationMsg(String key)
key
- the property key of the message to display, e.g "ui.msg.my-information-msg"
public final void setWarningMsg(String key)
key
- the property key of the message to display, e.g "ui.msg.my-warning-msg"
public final void setErrorMsg(String key)
key
- the property key of the message to display, e.g "ui.msg.my-error-msg"
public final void sendRedirect(String url) throws IOException
url
- the URL to redirect to, absolute (e.g. "http://www.jalios.com/"
)
or relative to the webapp base url (e.g. "work/index.jsp"
).
IOException
- if the response header could not be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |