Class OAuth2ClientAuthTokenProviderService

java.lang.Object
com.flowable.core.spring.security.oauth2.client.OAuth2ClientAuthTokenProviderService
All Implemented Interfaces:
com.flowable.platform.common.security.AuthTokenProvider

public class OAuth2ClientAuthTokenProviderService extends Object implements com.flowable.platform.common.security.AuthTokenProvider
Implementation of the AuthTokenProvider that uses the OAuth2AuthorizedClientService to fetch an access token for a clientRegistrationId.

Relies on the Spring security OAuth2 client registration machinery to lookup a client registration for a client registration id and to obtain access tokens.

Author:
Arthur Hupka-Merle
  • Field Details

  • Constructor Details

  • Method Details

    • getAuthToken

      public com.flowable.platform.common.security.AuthToken getAuthToken(String externalServiceId)
      Obtain access token for a client registration id.
      Specified by:
      getAuthToken in interface com.flowable.platform.common.security.AuthTokenProvider
      Parameters:
      externalServiceId - the client registration id to obtain the access token for
      Returns:
      the JWT access token encoded as string.
    • canProvideAuthToken

      public boolean canProvideAuthToken(String externalServiceId)
      Specified by:
      canProvideAuthToken in interface com.flowable.platform.common.security.AuthTokenProvider