public class CoinAuthenticationFilter
extends org.apache.shiro.web.filter.authc.AuthenticatingFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ERROR_KEY_ATTRIBUTE_NAME |
DEFAULT_SUCCESS_URLDEFAULT_LOGIN_URL, GET_METHOD, POST_METHODappliedPaths, pathMatcher| Constructor and Description |
|---|
CoinAuthenticationFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.shiro.authc.AuthenticationToken |
createToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
This method creates the authentication token with the user name & password.
|
String |
getFailureKeyAttribute() |
protected String |
getRemoteUser(javax.servlet.ServletRequest request)
Hook for subclasses to override the shibboleth default behaviour
|
protected boolean |
isLoginSubmission(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
This default implementation merely returns
true if the request
is an HTTP POST, false otherwise. |
protected boolean |
onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
The method that is called when an access request is denied because for
instance a user is not logged in.
|
protected boolean |
onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
The function that is triggerd on login Failure
|
protected boolean |
onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.subject.Subject subject,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
The method that is called on login success, so that the issuer can go to
the original page
|
protected void |
setFailureAttribute(javax.servlet.ServletRequest request,
org.apache.shiro.authc.AuthenticationException ae)
Set the reason for the authentication failure
|
void |
setFailureKeyAttribute(String failureKeyAttribute) |
void |
setLoginUrl(String loginUrl) |
createToken, createToken, executeLogin, getHost, isRememberMegetSuccessUrl, isAccessAllowed, issueSuccessRedirect, setSuccessUrlgetLoginUrl, getSubject, isLoginRequest, onAccessDenied, onPreHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogingetPathWithinApplication, pathsMatch, pathsMatch, preHandle, processPathConfigafterCompletion, cleanup, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfigpublic static final String DEFAULT_ERROR_KEY_ATTRIBUTE_NAME
public void setLoginUrl(String loginUrl)
setLoginUrl in class org.apache.shiro.web.filter.AccessControlFilterpublic String getFailureKeyAttribute()
public void setFailureKeyAttribute(String failureKeyAttribute)
protected org.apache.shiro.authc.AuthenticationToken createToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
createToken in class org.apache.shiro.web.filter.authc.AuthenticatingFilterrequest - the HttpServletRequestresponse - the HttpServletResponseExceptionprotected boolean onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
executeLogin
method.onAccessDenied in class org.apache.shiro.web.filter.AccessControlFilterrequest - the ServletRequestresponse - the ServletResponseExceptionprotected boolean onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.subject.Subject subject,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
onLoginSuccess in class org.apache.shiro.web.filter.authc.AuthenticatingFiltertoken - the AuthenticationToken for this successful login attemptsubject - the Subject (logged in user)request - the ServletRequestresponse - the ServletResponseExceptionprotected boolean onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException e,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
onLoginFailure in class org.apache.shiro.web.filter.authc.AuthenticatingFiltertoken - the AuthenticationTokene - the AuthenticationException that was thrownrequest - the ServletRequest for this request.response - the ServletResponse for this request.protected boolean isLoginSubmission(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
true if the request
is an HTTP POST, false otherwise. Can be
overridden by subclasses for custom login submission detection behavior.request - the incoming ServletRequestresponse - the outgoing ServletResponse.true if the request is an HTTP POST,
false otherwise.protected void setFailureAttribute(javax.servlet.ServletRequest request,
org.apache.shiro.authc.AuthenticationException ae)
request - the HttpServletRequest for the request that was issued.ae - the AuthenticationException that was thrown.protected String getRemoteUser(javax.servlet.ServletRequest request)
request - the httpRequestCopyright © 2007-2012. All Rights Reserved.