public class SocialAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 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,
java.lang.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(java.lang.String connectionAddedRedirectUrl) |
void |
setDefaultFailureUrl(java.lang.String defaultFailureUrl)
The URL to redirect to if authentication fails or if authorization is denied by the user.
|
void |
setFilterProcessesUrl(java.lang.String filterProcessesUrl) |
void |
setPostFailureUrl(java.lang.String postFailureUrl) |
void |
setPostLoginUrl(java.lang.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(java.lang.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, unsuccessfulAuthenticationpublic SocialAuthenticationFilter(org.springframework.security.authentication.AuthenticationManager authManager,
UserIdSource userIdSource,
UsersConnectionRepository usersConnectionRepository,
SocialAuthenticationServiceLocator authServiceLocator)
public void setSignupUrl(java.lang.String signupUrl)
signupUrl - The signup URLpublic void setDefaultFailureUrl(java.lang.String defaultFailureUrl)
defaultFailureUrl - The failure URL. Defaults to "/signin" (relative to the servlet context).public void setConnectionAddedRedirectUrl(java.lang.String connectionAddedRedirectUrl)
public void setUpdateConnections(boolean updateConnections)
public void setPostLoginUrl(java.lang.String postLoginUrl)
public void setAlwaysUsePostLoginUrl(boolean alwaysUsePostLoginUrl)
public void setPostFailureUrl(java.lang.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.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, java.lang.String userId, ConnectionData data)
public void setFilterProcessesUrl(java.lang.String filterProcessesUrl)
setFilterProcessesUrl in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter