All Superinterfaces:
OAuthState, org.mule.sdk.api.connectivity.oauth.OAuthState

@MinMuleVersion("4.1") @NoImplement public interface AuthorizationCodeState extends OAuthState
ConnectionProvider implementations which are also annotated with AuthorizationCode MUST have a field of this type. When the authorization dance is completed, the runtime will inject in such field an instance of this class. This class holds all the relevant information about the completed authorization dance so that the ConnectionProvider can make use of it.
Since:
1.0
  • Method Details

    • getRefreshToken

      Optional<String> getRefreshToken()
      Returns:
      The obtained refresh token
    • getResourceOwnerId

      String getResourceOwnerId()
      Returns:
      The id of the user that was authenticated
    • getState

      Optional<String> getState()
      Returns:
      The OAuth state that was originally sent
    • getAuthorizationUrl

      String getAuthorizationUrl()
      Returns:
      The url of the authorization endpoint that was used in the authorization process
    • getAccessTokenUrl

      String getAccessTokenUrl()
      Returns:
      The url of the access token endpoint that was used in the authorization process
    • getConsumerKey

      String getConsumerKey()
      Returns:
      The OAuth consumer key that was used in the authorization process
    • getConsumerSecret

      String getConsumerSecret()
      Returns:
      The OAuth consumer secret that was used in the authorization process
    • getExternalCallbackUrl

      Optional<String> getExternalCallbackUrl()
      Returns:
      The external callback url that the user configured or Optional.empty() if none was provided