Annotation Interface AuthorizationCode


@Target(TYPE) @Retention(RUNTIME) @Documented @MinMuleVersion("4.5.0") public @interface AuthorizationCode
To be used on implementations of ConnectionProvider, indicates that the provided connections will be authenticated using Authorization-Code grant type of the OAuth2 specification.

This annotation also contains a series of properties which describe the OAuth provider to authenticate against.

The annotated ConnectionProvider is still free to implement PoolingConnectionProvider or CachedConnectionProvider interfaces if needed, but connectivity testing will be disabled.

Since:
1.0
  • Element Details

    • accessTokenUrl

      String accessTokenUrl
      Returns:
      The Url of the endpoint which provides the access tokens
    • authorizationUrl

      String authorizationUrl
      Returns:
      The url of the authorization endpoint which starts the OAuth dance
    • accessTokenExpr

      String accessTokenExpr
      Returns:
      Expression to be used on the response of accessTokenUrl() to extract the access token
      Default:
      "#[payload.access_token]"
    • expirationExpr

      String expirationExpr
      Returns:
      Expression to be used on the response of accessTokenUrl() to extract the access token expiration
      Default:
      "#[payload.expires_in]"
    • refreshTokenExpr

      String refreshTokenExpr
      Returns:
      Expression to be used on the response of accessTokenUrl() to extract the refresh token
      Default:
      "#[payload.refresh_token]"
    • defaultScopes

      String defaultScopes
      Returns:
      The default set of scopes to be requested, as a comma separated list. Empty string means no default scopes.
      Default:
      ""
    • credentialsPlacement

      CredentialsPlacement credentialsPlacement
      Allows to customize the placement that the client credentials will have in the request.
      Returns:
      the selected CredentialsPlacement. Defaults to CredentialsPlacement.BODY
      Default:
      BODY
    • includeRedirectUriInRefreshTokenRequest

      boolean includeRedirectUriInRefreshTokenRequest
      Whether the redirect_uri parameter should be included in the refresh token request. Defaults to true
      Since:
      1.4.0
      Default:
      true