public class SocialAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messages, SPRING_SECURITY_LAST_EXCEPTION_KEY
logger
Constructor and Description |
---|
SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager,
UserIdSource userIdSource,
UsersConnectionRepository usersConnectionRepository,
SocialAuthenticationServiceLocator authServiceLocator) |
Modifier and Type | Method and Description |
---|---|
protected Connection<?> |
addConnection(SocialAuthenticationService<?> authService,
String userId,
ConnectionData data) |
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
detectRejection(javax.servlet.http.HttpServletRequest request)
Detects a callback request after a user rejects authorization to prevent a never-ending redirect loop.
|
SocialAuthenticationServiceLocator |
getAuthServiceLocator() |
UsersConnectionRepository |
getUsersConnectionRepository() |
protected boolean |
requiresAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated.
|
void |
setAlwaysUsePostLoginUrl(boolean alwaysUsePostLoginUrl) |
void |
setConnectionAddedRedirectUrl(String connectionAddedRedirectUrl) |
void |
setDefaultFailureUrl(String defaultFailureUrl)
The URL to redirect to if authentication fails or if authorization is denied by the user.
|
void |
setFilterProcessesUrl(String filterProcessesUrl) |
void |
setPostFailureUrl(String postFailureUrl) |
void |
setPostLoginUrl(String postLoginUrl) |
void |
setSessionStrategy(SessionStrategy sessionStrategy)
Sets a strategy to use when persisting information that is to survive past the boundaries of a request.
|
void |
setSignupUrl(String signupUrl)
Sets the signup URL; the URL to redirect to if authentication fails so that the user can register with the application.
|
void |
setUpdateConnections(boolean updateConnections) |
afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getFilterProcessesUrl, getRememberMeServices, getSuccessHandler, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, successfulAuthentication, unsuccessfulAuthentication
addRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
public SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager, UserIdSource userIdSource, UsersConnectionRepository usersConnectionRepository, SocialAuthenticationServiceLocator authServiceLocator)
public void setSignupUrl(String signupUrl)
signupUrl
- The signup URLpublic void setDefaultFailureUrl(String defaultFailureUrl)
defaultFailureUrl
- The failure URL. Defaults to "/signin" (relative to the servlet context).public void setConnectionAddedRedirectUrl(String connectionAddedRedirectUrl)
public void setUpdateConnections(boolean updateConnections)
public void setPostLoginUrl(String postLoginUrl)
public void setAlwaysUsePostLoginUrl(boolean alwaysUsePostLoginUrl)
public void setPostFailureUrl(String postFailureUrl)
public void setSessionStrategy(SessionStrategy sessionStrategy)
sessionStrategy
- the session strategy.public UsersConnectionRepository getUsersConnectionRepository()
public SocialAuthenticationServiceLocator getAuthServiceLocator()
public org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException
attemptAuthentication
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
org.springframework.security.core.AuthenticationException
protected boolean detectRejection(javax.servlet.http.HttpServletRequest request)
request
- the request to check for rejection.@Deprecated protected boolean requiresAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Check if request URL matches filterProcessesUrl with valid providerId. The URL must be like {filterProcessesUrl}/{providerId}.
requiresAuthentication
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
true
if the filter should attempt authentication, false
otherwise.protected Connection<?> addConnection(SocialAuthenticationService<?> authService, String userId, ConnectionData data)
public void setFilterProcessesUrl(String filterProcessesUrl)
setFilterProcessesUrl
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter