Class OauthProviderExtensionPoint

All Implemented Interfaces:
LogEnabled, ExtensionPoint<OAuthProvider>, Disposable, Initializable, Component, Contextualizable, Serviceable, ThreadSafe

Extension point registering all the OAuth provider currently available
  • Field Details

    • ROLE

      public static final String ROLE
      The avalon role
  • Constructor Details

  • Method Details

    • getStoredAccessToken

      public Optional<com.nimbusds.oauth2.sdk.token.AccessToken> getStoredAccessToken(String providerId)
      Get the stored access token if it exist. If a token exists, but is expired, this method will silently try to refresh it.
      Parameters:
      providerId - the provider that granted the token
      Returns:
      the access token or empty
    • getProviderForState

      public OAuthProvider getProviderForState(com.nimbusds.oauth2.sdk.id.State state)
      Get the provider linked to the state.
      Parameters:
      state - the state linked to a provider
      Returns:
      the provider id
      Throws:
      IllegalStateException - if the state is not linked to a provider