Class CustomOAuth2AuthenticationProviderUtils

java.lang.Object
swiss.trustbroker.oidc.CustomOAuth2AuthenticationProviderUtils

public class CustomOAuth2AuthenticationProviderUtils extends Object
Copied from spring-security-oauth2-authorization-server: org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthenticationProviderUtils That class is final and the method package private. It is also duplicated in org.springframework.security.oauth2.server.oidc.authentication.OidcAuthenticationProviderUtils. So we cannot re-use that code. invalidate is unchanged. getAuthenticatedClientElseThrowInvalidClient is adapted to Saml2Authentication. The copying means we are tied to an internal class from Spring Authentication Server.

Original Javadoc: Utility methods for the OpenID Connect 1.0 AuthenticationProvider's.

Since:
0.1.1
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NonNull org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext
    generateTokenContextForTokenExchange(org.springframework.security.oauth2.server.authorization.OAuth2TokenType tokenType, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken tokenExchangeAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient, org.springframework.security.core.Authentication principal, Set<String> authorizedScopes, org.springframework.security.oauth2.jwt.Jwt dPoPProof)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • generateTokenContextForTokenExchange

      public static @NonNull org.springframework.security.oauth2.server.authorization.token.DefaultOAuth2TokenContext generateTokenContextForTokenExchange(org.springframework.security.oauth2.server.authorization.OAuth2TokenType tokenType, org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken tokenExchangeAuthentication, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient, org.springframework.security.core.Authentication principal, Set<String> authorizedScopes, org.springframework.security.oauth2.jwt.Jwt dPoPProof)