Class CustomOAuth2TokenExchangeAuthenticationProvider

java.lang.Object
swiss.trustbroker.oidc.CustomOAuth2TokenExchangeAuthenticationProvider
All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider

public class CustomOAuth2TokenExchangeAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
Token exchange handler endpoint. Copied from spring-security-oauth2-authorization-server: org.springframework.security.oauth2.server.authorization.authentication.OAuth2TokenExchangeAuthenticationProvider. That class is final, so we cannot subclass it. authenticate is customized to work around external token handling The copying means we are tied to an internal class from Spring Authentication Server.

Original Javadoc: An AuthenticationProvider implementation for OAuth 2.0 Token Exchange.

Since:
1.3
See Also:
  • OAuth2TokenExchangeAuthenticationToken
  • OAuth2AccessTokenAuthenticationToken
  • OAuth2AuthorizationService
  • OAuth2TokenGenerator
  • Section 2.1. Request
  • Constructor Details

  • Method Details

    • authenticate

      public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
      Specified by:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • supports

      public boolean supports(Class<?> authentication)
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider