public abstract class AuthenticationFilter extends AccessControlFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SUCCESS_URL |
DEFAULT_LOGIN_URL, GET_METHOD, POST_METHODappliedPaths, pathMatcherALREADY_FILTERED_SUFFIXfilterConfig| Constructor and Description |
|---|
AuthenticationFilter() |
| Modifier and Type | Method and Description |
|---|---|
String |
getSuccessUrl()
Returns the success url to use as the default location a user is sent after logging in.
|
protected boolean |
isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Determines whether the current subject is authenticated.
|
protected void |
issueSuccessRedirect(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Redirects to user to the previously attempted URL after a successful login.
|
void |
setSuccessUrl(String successUrl)
Sets the default/fallback success url to use as the default location a user is sent after logging in.
|
getLoginUrl, getSubject, isLoginRequest, onAccessDenied, onAccessDenied, onPreHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setLoginUrlgetPathWithinApplication, isEnabled, pathsMatch, pathsMatch, preHandle, processPathConfigafterCompletion, cleanup, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, setEnabled, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfiggetContextAttribute, getContextInitParam, getServletContext, removeContextAttribute, setContextAttribute, setServletContext, toStringpublic static final String DEFAULT_SUCCESS_URL
public String getSuccessUrl()
DEFAULT_SUCCESS_URL.public void setSuccessUrl(String successUrl)
DEFAULT_SUCCESS_URL.successUrl - the success URL to redirect the user to after a successful login.protected boolean isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
acquires
the currently executing Subject and then returns
subject.isAuthenticated();isAccessAllowed in class AccessControlFilterrequest - the incoming ServletRequestresponse - the outgoing ServletResponsemappedValue - the filter-specific config value mapped to this filter in the URL rules mappings.protected void issueSuccessRedirect(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
WebUtils.redirectToSavedRequest
using the successUrl as the fallbackUrl argument to that call.request - the incoming requestresponse - the outgoing responseException - if there is a problem redirecting.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.