public class Auth2LoginAuthenticationFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
AbstractAuthenticationProcessingFilter for OAuth 2.0
Login.AbstractAuthenticationProcessingFilter,
Section
4.1 Authorization Code Grant,
Section 4.1.2 Authorization
Response| 限定符和类型 | 字段和说明 |
|---|---|
static String |
TEMPORARY_USER_CACHE_KEY_PREFIX |
static String |
TEMPORARY_USERNAME_PARAM_NAME |
| 构造器和说明 |
|---|
Auth2LoginAuthenticationFilter(String filterProcessesUrl,
String signUpUrl,
org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource,
org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
Constructs an
Auth2LoginAuthenticationFilter using the provided
parameters. |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
setDetails(javax.servlet.http.HttpServletRequest request,
Auth2LoginAuthenticationToken authRequest)
Provided so that subclasses may configure what is put into the auth
request's details property.
|
void |
setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy) |
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
org.springframework.security.core.Authentication authResult) |
afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, unsuccessfulAuthenticationpublic static final String TEMPORARY_USER_CACHE_KEY_PREFIX
public Auth2LoginAuthenticationFilter(@NonNull
String filterProcessesUrl,
@Nullable
String signUpUrl,
@Nullable
org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource,
@Autowired(required=false) @Nullable
org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
Auth2LoginAuthenticationFilter using the provided
parameters.filterProcessesUrl - the URI where this Filter will process
the authentication requests, not nullsignUpUrl - 第三方授权登录后如未注册用户不支持自动注册功能, 则跳转到此 url 进行注册逻辑, 此 url 必须开发者自己实现authenticationDetailsSource - AuthenticationDetailsSourceredisConnectionFactory - redis connection factorypublic org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws org.springframework.security.core.AuthenticationException
attemptAuthentication 在类中 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterorg.springframework.security.core.AuthenticationExceptionprotected void successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
org.springframework.security.core.Authentication authResult)
throws IOException,
javax.servlet.ServletException
successfulAuthentication 在类中 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterIOExceptionjavax.servlet.ServletExceptionprotected void setDetails(javax.servlet.http.HttpServletRequest request,
Auth2LoginAuthenticationToken authRequest)
request - that an auth request is being created forauthRequest - the auth request object that should have its details
setpublic void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
Copyright © 2021. All rights reserved.