public final class OAuthFilter
extends org.apache.shiro.web.filter.authc.AuthenticatingFilter
DEFAULT_SUCCESS_URLDEFAULT_LOGIN_URL, GET_METHOD, POST_METHODappliedPaths, pathMatcher| Constructor and Description |
|---|
OAuthFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.shiro.authc.AuthenticationToken |
createToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
The token created for this authentication is an OAuthToken containing the OAuth credential received after authentication at the OAuth
provider.
|
protected boolean |
isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
Returns
false to always force authentication (user is never considered authenticated by this filter). |
protected boolean |
onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Execute login by creating
token and logging subject
with this token. |
protected boolean |
onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException ae,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
If login has failed, redirect user to the error page except if the user is already authenticated, in which case redirect to the
default success url.
|
protected boolean |
onLoginSuccess(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.subject.Subject subject,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
If login has been successful, redirect user to the original protected url.
|
void |
setFailureUrl(String failureUrl) |
void |
setProvider(org.scribe.up.provider.OAuthProvider provider) |
void |
setProvidersDefinition(org.scribe.up.provider.ProvidersDefinition providersDefinition) |
cleanup, createToken, createToken, executeLogin, getHost, isPermissive, isRememberMegetSuccessUrl, issueSuccessRedirect, setSuccessUrlgetLoginUrl, getSubject, isLoginRequest, onAccessDenied, onPreHandle, redirectToLogin, saveRequest, saveRequestAndRedirectToLogin, setLoginUrlgetPathWithinApplication, isEnabled, pathsMatch, pathsMatch, preHandle, processPathConfigafterCompletion, doFilterInternal, executeChain, postHandledoFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, setEnabled, shouldNotFiltergetName, setName, toStringBuilderdestroy, getFilterConfig, getInitParam, init, onFilterConfigSet, setFilterConfigprotected 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 incoming requestresponse - the outgoing responseException - if there is an error processing the request.protected boolean onAccessDenied(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws Exception
token and logging subject
with this token.onAccessDenied in class org.apache.shiro.web.filter.AccessControlFilterrequest - the incoming requestresponse - the outgoing responseException - if there is an error processing the request.protected boolean isAccessAllowed(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Object mappedValue)
false to always force authentication (user is never considered authenticated by this filter).isAccessAllowed in class org.apache.shiro.web.filter.authc.AuthenticatingFilterrequest - the incoming requestresponse - the outgoing responsemappedValue - the filter-specific config value mapped to this filter in the URL rules mappings.falseprotected 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 token representing the current authenticationsubject - the current authenticated subjetrequest - the incoming requestresponse - the outgoing responseException - if there is an error processing the request.protected boolean onLoginFailure(org.apache.shiro.authc.AuthenticationToken token,
org.apache.shiro.authc.AuthenticationException ae,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
onLoginFailure in class org.apache.shiro.web.filter.authc.AuthenticatingFiltertoken - the token representing the current authenticationae - the current authentication exceptionrequest - the incoming requestresponse - the outgoing responsepublic void setFailureUrl(String failureUrl)
public void setProvider(org.scribe.up.provider.OAuthProvider provider)
public void setProvidersDefinition(org.scribe.up.provider.ProvidersDefinition providersDefinition)
Copyright © 2013. All Rights Reserved.