public class OAuth2ClientAuthenticationProcessingFilter
extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
Modifier and Type | Field and Description |
---|---|
OAuth2RestOperations |
restTemplate |
messages
logger
Constructor and Description |
---|
OAuth2ClientAuthenticationProcessingFilter(String defaultFilterProcessesUrl) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setApplicationEventPublisher(ApplicationEventPublisher eventPublisher) |
void |
setRestTemplate(OAuth2RestOperations restTemplate)
A rest template to be used to obtain an access token.
|
void |
setTokenServices(ResourceServerTokenServices tokenServices)
Reference to a CheckTokenServices that can validate an OAuth2AccessToken
|
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
org.springframework.security.core.Authentication authResult) |
protected void |
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException failed) |
doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
public OAuth2RestOperations restTemplate
public OAuth2ClientAuthenticationProcessingFilter(String defaultFilterProcessesUrl)
public void setTokenServices(ResourceServerTokenServices tokenServices)
tokenServices
- public void setRestTemplate(OAuth2RestOperations restTemplate)
restTemplate
- a rest templatepublic void setApplicationEventPublisher(ApplicationEventPublisher eventPublisher)
setApplicationEventPublisher
in interface ApplicationEventPublisherAware
setApplicationEventPublisher
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
public org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException, IOException, javax.servlet.ServletException
attemptAuthentication
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
org.springframework.security.core.AuthenticationException
IOException
javax.servlet.ServletException
protected 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
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
IOException
javax.servlet.ServletException
protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed) throws IOException, javax.servlet.ServletException
unsuccessfulAuthentication
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
IOException
javax.servlet.ServletException
Copyright © 2019. All rights reserved.