public class AuthenticationRequiredHandlerImpl extends Object implements AuthenticationRequiredHandler
AuthenticationRequiredHandler
:
Modifier and Type | Field and Description |
---|---|
protected String |
loginFormUrl |
protected org.springframework.security.web.savedrequest.RequestCache |
requestCache |
Constructor and Description |
---|
AuthenticationRequiredHandlerImpl()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected String |
getLoginFormUrl() |
void |
handle(org.craftercms.commons.http.RequestContext context,
AuthenticationException e)
Saves the current request in the request cache and then redirects to the login form page.
|
protected void |
saveRequest(org.craftercms.commons.http.RequestContext context) |
protected void |
sendError(AuthenticationException e,
org.craftercms.commons.http.RequestContext context) |
void |
setLoginFormUrl(String loginFormUrl)
Sets the URL of the login form page.
|
void |
setRequestCache(org.springframework.security.web.savedrequest.RequestCache requestCache)
Sets the cache where the current request is saved.
|
protected String loginFormUrl
protected org.springframework.security.web.savedrequest.RequestCache requestCache
public AuthenticationRequiredHandlerImpl()
public void setLoginFormUrl(String loginFormUrl)
protected String getLoginFormUrl()
public void setRequestCache(org.springframework.security.web.savedrequest.RequestCache requestCache)
public void handle(org.craftercms.commons.http.RequestContext context, AuthenticationException e) throws SecurityProviderException, IOException
handle
in interface AuthenticationRequiredHandler
context
- the request security contexte
- the exception with the reason for requiring authenticationSecurityProviderException
IOException
protected void saveRequest(org.craftercms.commons.http.RequestContext context)
protected void sendError(AuthenticationException e, org.craftercms.commons.http.RequestContext context) throws IOException
IOException
Copyright © 2023 CrafterCMS. All rights reserved.