public abstract class AuthenticatingFilter extends AuthenticationFilter
AuthenticationFilter that is capable of automatically performing an authentication attempt
based on the incoming request.GET_METHOD, LOGIN_URL, pathMatcher, POST_METHOD, REDIRECT_TO_SAVED_URL, SUCCESS_URL, TAPESTRY_VERSION, UNAUTHORIZED_URL| Constructor and Description |
|---|
AuthenticatingFilter(LoginContextService loginContextService) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.apache.shiro.authc.AuthenticationToken |
createToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected org.apache.shiro.authc.AuthenticationToken |
createToken(String username,
String password,
boolean rememberMe,
String host) |
protected org.apache.shiro.authc.AuthenticationToken |
createToken(String username,
String password,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected boolean |
executeLogin(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected String |
getHost(javax.servlet.ServletRequest request)
Returns the host name or IP associated with the current subject.
|
protected boolean |
isRememberMe(javax.servlet.ServletRequest request)
Returns
true if "rememberMe" should be enabled for the login attempt associated with the
current request, false otherwise. |
protected boolean |
onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected boolean |
onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.subject.Subject subject,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
isAccessAllowed, issueSuccessRedirectaddConfig, getLoginContextService, getLoginUrl, getSubject, getSuccessUrl, getUnauthorizedUrl, isLoginRequest, isRedirectToSavedUrl, onAccessDenied, onAccessDenied, onPreHandle, preHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setConfig, setLoginUrl, setRedirectToSavedUrl, setSuccessUrl, setUnauthorizedUrlafterCompletion, cleanup, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, setEnabled, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfigpublic AuthenticatingFilter(LoginContextService loginContextService)
protected boolean executeLogin(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
Exceptionprotected abstract org.apache.shiro.authc.AuthenticationToken createToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
Exceptionprotected org.apache.shiro.authc.AuthenticationToken createToken(String username, String password, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
protected org.apache.shiro.authc.AuthenticationToken createToken(String username, String password, boolean rememberMe, String host)
protected boolean onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.subject.Subject subject,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
Exceptionprotected boolean onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
protected String getHost(javax.servlet.ServletRequest request)
AuthenticationToken.
The default implementation merely returns ServletRequest.getRemoteHost().request - the incoming ServletRequestInetAddress to associate with the login attempt.protected boolean isRememberMe(javax.servlet.ServletRequest request)
true if "rememberMe" should be enabled for the login attempt associated with the
current request, false otherwise.
This implementation always returns false and is provided as a template hook to subclasses that
support rememberMe logins and wish to determine rememberMe in a custom mannner
based on the current request.request - the incoming ServletRequesttrue if "rememberMe" should be enabled for the login attempt associated with the
current request, false otherwise.Copyright © 2004–2015. All rights reserved.