Module org.mule.sdk.api
Annotation Interface ClientCredentials
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@MinMuleVersion("4.5.0")
public @interface ClientCredentials
To be used on implementations of
ConnectionProvider, indicates that the provided connections will be authenticated
using Client Credentials 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
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAllows to customize the placement that the client credentials will have in the request.
-
Element Details
-
tokenUrl
String tokenUrl- Returns:
- The Url of the endpoint which provides the access tokens
-
-
-
accessTokenExpr
String accessTokenExpr- Returns:
- Expression to be used on the response of
tokenUrl()to extract the access token
- Default:
- "#[payload.access_token]"
-
expirationExpr
String expirationExpr- Returns:
- Expression to be used on the response of
tokenUrl()to extract the access token expiration
- Default:
- "#[payload.expires_in]"
-
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 credentialsPlacementAllows to customize the placement that the client credentials will have in the request.- Returns:
- the selected
CredentialsPlacement. Defaults toCredentialsPlacement.BASIC_AUTH_HEADER
- Default:
- BASIC_AUTH_HEADER
-