public class SocialAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messageslogger| 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 |
setConnectionAddingFailureRedirectUrl(String connectionAddingFailureRedirectUrl)
redirect the user after an attempt to add an additional authentication failed.
|
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(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, getRememberMeServices, getSuccessHandler, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthenticationaddRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContextpublic SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager,
UserIdSource userIdSource,
UsersConnectionRepository usersConnectionRepository,
SocialAuthenticationServiceLocator authServiceLocator)
public void setSignupUrl(String signupUrl)
signupUrl - The signup URLpublic void setConnectionAddedRedirectUrl(String connectionAddedRedirectUrl)
public void setConnectionAddingFailureRedirectUrl(String connectionAddingFailureRedirectUrl)
connectionAddingFailureRedirectUrl - The URL to redirect to after a failing connection following authorizationpublic 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(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.AbstractAuthenticationProcessingFilterorg.springframework.security.core.AuthenticationExceptionprotected 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.AbstractAuthenticationProcessingFiltertrue 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