Class CustomTokenRevocationAuthenticationProvider

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

public class CustomTokenRevocationAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
Revocation handler endpoint. Copied from spring-security-oauth2-authorization-server: org.springframework.security.oauth2.server.authorization.authentication.OAuth2TokenRevocationAuthenticationProvider. That class is final, so we cannot subclass it. authenticate is customized to work around SAML2 kicking in when federating and provide some improved logging. The copying means we are tied to an internal class from Spring Authentication Server.

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

Since:
0.0.3
See Also:
  • Constructor Details

    • CustomTokenRevocationAuthenticationProvider

      public CustomTokenRevocationAuthenticationProvider(org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, TrustBrokerProperties trustBrokerProperties)
  • Method Details

    • authenticate

      @Transactional 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