Package swiss.trustbroker.oidc
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:
-
Constructor Summary
ConstructorsConstructorDescriptionCustomOAuth2TokenExchangeAuthenticationProvider(ClientConfigInMemoryRepository registeredClientRepository, CustomOAuth2AuthorizationService authorizationService, OidcMetadataCacheService oidcMetadataCacheService, RelyingPartyDefinitions relyingPartyDefinitions, TrustBrokerProperties trustBrokerProperties, RelyingPartyService relyingPartyService, RelyingPartySetupService relyingPartySetupService, QoaMappingService qoaMappingService, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) boolean
-
Constructor Details
-
CustomOAuth2TokenExchangeAuthenticationProvider
public CustomOAuth2TokenExchangeAuthenticationProvider(ClientConfigInMemoryRepository registeredClientRepository, CustomOAuth2AuthorizationService authorizationService, OidcMetadataCacheService oidcMetadataCacheService, RelyingPartyDefinitions relyingPartyDefinitions, TrustBrokerProperties trustBrokerProperties, RelyingPartyService relyingPartyService, RelyingPartySetupService relyingPartySetupService, QoaMappingService qoaMappingService, org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator)
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-