|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint org.zkoss.spring.security.ui.webapp.ZkAuthenticationEntryPoint
public class ZkAuthenticationEntryPoint
Used by ZkExceptionTranslationListener
to commence an authentication
scheme.
This implementation pops up a login Window and show the login form page
(see LoginUrlAuthenticationEntryPoint.setLoginFormUrl(java.lang.String)
)
you specified(or the default one if you did not specify) as the content of the
window. When the user login OK,
it then show the login OK page you specified(see setLoginOKUrl(java.lang.String)
) or
the default one if you did not specified) and close the pop up window
automatically.
If you want to customize your pop up login window, you can choose one of following options per your requirements:
setLoginTemplateArg(java.lang.String, java.lang.Object)
)setLoginTemplate(java.lang.String)
)
and template arguments(see setLoginTemplateArg(java.lang.String, java.lang.Object)
).
Field Summary | |
---|---|
static java.lang.String |
AUTH
Spring Authentication object |
static java.lang.String |
EVENTS
ZK Events that have not been processed because of the Authentication exception |
static java.lang.String |
FORCE_HTTPS
Force desktop to use https after successful authentication |
static java.lang.String |
LOGIN_FAIL_URL
Provided login fail url (provided for ajax login) |
static java.lang.String |
LOGIN_OK_DELAY
Delay seconds to close the popup login window |
static java.lang.String |
LOGIN_OK_TEMPLATE
Provided login ok template url |
static java.lang.String |
LOGIN_OK_URL
Provided login ok url |
static java.lang.String |
LOGIN_WIN
The popup template window uuid, need this info to remove it when login ok |
static java.lang.String |
SAVED_DESKTOP
The desktop which enter the login |
static java.lang.String |
SAVED_URL
The URL which enter the login |
static java.lang.String |
SPRING_SECURITY_SAVED_REQUEST_KEY
|
Constructor Summary | |
---|---|
ZkAuthenticationEntryPoint()
|
Method Summary | |
---|---|
void |
commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException authException)
|
protected java.lang.String |
determineUrlToUseForThisRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException exception)
|
java.lang.String |
getLoginFailUrl()
Returns the login Fail URL. |
int |
getLoginOKDelay()
Returns the delay seconds to close the login window after login OK(successfully). |
java.lang.String |
getLoginOKTemplate()
Returns the login OK Template URL. |
java.lang.String |
getLoginOKUrl()
Returns the login OK URL. |
java.lang.String |
getLoginTemplate()
Returns the login template URL. |
java.util.Map |
getLoginTemplateArgs()
Return the login template window arguments Map. |
void |
removeLoginTemplateArg(java.lang.String param)
Remove the specified login template parameter. |
void |
setLoginFailUrl(java.lang.String loginFailUrl)
Sets the login Fail URL. |
void |
setLoginOKDelay(int seconds)
Sets the delay seconds to close the login window after login OK(successfully). |
void |
setLoginOKTemplate(java.lang.String loginOKTemplate)
Set the login OK URL. |
void |
setLoginOKUrl(java.lang.String loginOKUrl)
Set the login OK URL. |
void |
setLoginTemplate(java.lang.String templateURL)
Set the login template URL. |
void |
setLoginTemplateArg(java.lang.String param,
java.lang.Object value)
The argument to be passed into the login window template (see getLoginTemplate() ). |
void |
setLoginTemplateArgs(java.util.Map map)
Sets the login template window arguments Map. |
Methods inherited from class org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint |
---|
afterPropertiesSet, buildHttpsRedirectUrlForRequest, buildRedirectUrlToLoginPage, getLoginFormUrl, getPortMapper, getPortResolver, isForceHttps, isUseForward, setForceHttps, setLoginFormUrl, setPortMapper, setPortResolver, setUseForward |
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 SPRING_SECURITY_SAVED_REQUEST_KEY
public static final java.lang.String LOGIN_OK_URL
public static final java.lang.String LOGIN_OK_TEMPLATE
public static final java.lang.String LOGIN_FAIL_URL
public static final java.lang.String SAVED_URL
public static final java.lang.String SAVED_DESKTOP
public static final java.lang.String LOGIN_WIN
public static final java.lang.String FORCE_HTTPS
public static final java.lang.String LOGIN_OK_DELAY
public static final java.lang.String EVENTS
public static final java.lang.String AUTH
Constructor Detail |
---|
public ZkAuthenticationEntryPoint()
Method Detail |
---|
public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws java.io.IOException, javax.servlet.ServletException
commence
in interface org.springframework.security.web.AuthenticationEntryPoint
commence
in class org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
java.io.IOException
javax.servlet.ServletException
public void setLoginTemplateArg(java.lang.String param, java.lang.Object value)
The argument to be passed into the login window template
(see getLoginTemplate()
). If you did not specify own login
window template, the system use the default one.
In login window template, you can customize it by passing arguments into it via this method. And you refer the parameter by specifying in the template window in EL with ${arg.xxx} or in <zscript> with arg.xxx.
If you don't specify your own login window template, you can still customize the default login window template by assign values to following parameters.
param | type | memo | ||||||||
title | String | Login Window Title | ||||||||
width | String | window width | ||||||||
height | String | window height |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |