public class SocialAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messages, SPRING_SECURITY_LAST_EXCEPTION_KEYlogger| Constructor and Description |
|---|
SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager,
org.springframework.social.UserIdSource userIdSource,
org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository,
SocialAuthenticationServiceLocator authServiceLocator) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.social.connect.Connection<?> |
addConnection(SocialAuthenticationService<?> authService,
String userId,
org.springframework.social.connect.ConnectionData data) |
org.springframework.security.core.Authentication |
attemptAuthentication(HttpServletRequest request,
HttpServletResponse response) |
protected boolean |
detectRejection(HttpServletRequest request)
Detects a callback request after a user rejects authorization to prevent a never-ending redirect loop.
|
SocialAuthenticationServiceLocator |
getAuthServiceLocator() |
org.springframework.social.connect.UsersConnectionRepository |
getUsersConnectionRepository() |
protected boolean |
requiresAuthentication(HttpServletRequest request,
HttpServletResponse response)
Deprecated.
|
void |
setAlwaysUsePostLoginUrl(boolean alwaysUsePostLoginUrl) |
void |
setConnectionAddedRedirectUrl(String connectionAddedRedirectUrl)
an authenticated user can add additional connections.
|
void |
setConnectionAddingFailureRedirectUrl(String connectionAddingFailureRedirectUrl)
redirect the user after an attempt to add an additional authentication failed.
|
void |
setDefaultFailureUrl(String defaultFailureUrl)
Deprecated.
use
setPostFailureUrl(String) instead |
void |
setFilterProcessesUrl(String filterProcessesUrl) |
void |
setPostFailureUrl(String postFailureUrl)
The URL to redirect to if authentication fails or if authorization is denied by the user.
|
void |
setPostLoginUrl(String postLoginUrl) |
void |
setSessionStrategy(org.springframework.social.connect.web.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, unsuccessfulAuthenticationaddRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContextpublic SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager,
org.springframework.social.UserIdSource userIdSource,
org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository,
SocialAuthenticationServiceLocator authServiceLocator)
public void setSignupUrl(String signupUrl)
signupUrl - The signup URL@Deprecated public void setDefaultFailureUrl(String defaultFailureUrl)
setPostFailureUrl(String) insteadpublic void setConnectionAddedRedirectUrl(String connectionAddedRedirectUrl)
public void setConnectionAddingFailureRedirectUrl(String connectionAddingFailureRedirectUrl)
public void setUpdateConnections(boolean updateConnections)
public void setPostLoginUrl(String postLoginUrl)
public void setAlwaysUsePostLoginUrl(boolean alwaysUsePostLoginUrl)
public void setPostFailureUrl(String postFailureUrl)
postFailureUrl - The failure URL. Defaults to "/signin" (relative to the servlet context).public void setSessionStrategy(org.springframework.social.connect.web.SessionStrategy sessionStrategy)
sessionStrategy - the session strategy.public org.springframework.social.connect.UsersConnectionRepository getUsersConnectionRepository()
public SocialAuthenticationServiceLocator getAuthServiceLocator()
public org.springframework.security.core.Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws org.springframework.security.core.AuthenticationException
attemptAuthentication in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterorg.springframework.security.core.AuthenticationExceptionprotected boolean detectRejection(HttpServletRequest request)
request - the request to check for rejection.@Deprecated protected boolean requiresAuthentication(HttpServletRequest request, 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.AbstractAuthenticationProcessingFiltertrue if the filter should attempt authentication, false otherwise.protected org.springframework.social.connect.Connection<?> addConnection(SocialAuthenticationService<?> authService, String userId, org.springframework.social.connect.ConnectionData data)
public void setFilterProcessesUrl(String filterProcessesUrl)
setFilterProcessesUrl in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter