@NoImplement public interface OAuthAuthorizationCodeDancerBuilder extends OAuthDancerBuilder<AuthorizationCodeOAuthDancer>
| Modifier and Type | Method and Description |
|---|---|
OAuthAuthorizationCodeDancerBuilder |
addListener(AuthorizationCodeListener listener)
Adds the provided
listener |
OAuthAuthorizationCodeDancerBuilder |
afterDanceCallback(BiConsumer<AuthorizationCodeDanceCallbackContext,ResourceOwnerOAuthContext> callback)
Allows custom code to be run after doing the request to the provided
tokenUrl and processing its results. |
OAuthAuthorizationCodeDancerBuilder |
authorizationUrl(String authorizationUrl) |
OAuthAuthorizationCodeDancerBuilder |
beforeDanceCallback(Function<AuthorizationCodeRequest,AuthorizationCodeDanceCallbackContext> callback)
Allows custom code to be run just before doing the request to the provided
tokenUrl. |
OAuthAuthorizationCodeDancerBuilder |
customHeaders(Map<String,String> customHeaders)
There are OAuth implementations that require or allow extra headers to be sent when calling the Authentication URL
of the OAS.
|
OAuthAuthorizationCodeDancerBuilder |
customHeaders(Supplier<Map<String,String>> customHeaders)
There are OAuth implementations that require or allow extra headers to be sent when calling the Authentication URL
of the OAS.
|
OAuthAuthorizationCodeDancerBuilder |
customParameters(Map<String,String> customParameters)
There are OAuth implementations that require or allow extra query parameters to be sent when calling the Authentication URL
of the OAS.
|
OAuthAuthorizationCodeDancerBuilder |
customParameters(Supplier<Map<String,String>> customParameters)
There are OAuth implementations that require or allow extra query parameters to be sent when calling the Authentication URL
of the OAS.
|
default OAuthAuthorizationCodeDancerBuilder |
encodeClientCredentialsInBody(boolean encodeClientCredentialsInBody)
Deprecated.
since 4.2.0. Use
OAuthDancerBuilder.withClientCredentialsIn(ClientCredentialsLocation) instead. |
OAuthAuthorizationCodeDancerBuilder |
externalCallbackUrl(String externalCallbackUrl)
The oauth authentication server will use this url to provide the authentication code to the Mule server so the mule server
can retrieve the access token.
|
OAuthAuthorizationCodeDancerBuilder |
localAuthorizationUrlPath(String path)
If this attribute is provided mule will automatically create and endpoint in the host server (the same configured for
localCallback(java.net.URL)) that the user can hit to authenticate and grant access to the application for his account. |
OAuthAuthorizationCodeDancerBuilder |
localAuthorizationUrlResourceOwnerId(String localAuthorizationUrlResourceOwnerIdExpr)
This attribute is only required when the applications needs to access resources from more than one user in the OAuth
authentication server.
|
OAuthAuthorizationCodeDancerBuilder |
localCallback(HttpServer server,
String localCallbackConfigPath)
The produced
AuthorizationCodeOAuthDancer will use an existing HttpServer to listen on the provided
localCallbackConfigPath. |
OAuthAuthorizationCodeDancerBuilder |
localCallback(URL localCallbackUrl)
The produced
AuthorizationCodeOAuthDancer will create an HttpServer to listen on the provided
localCallbackUrl. |
OAuthAuthorizationCodeDancerBuilder |
localCallback(URL localCallbackUrl,
org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
The produced
AuthorizationCodeOAuthDancer will create an HttpServer with the provided
tlsContextFactory to listen on the provided localCallbackUrl. |
OAuthAuthorizationCodeDancerBuilder |
state(String stateExpr)
Mule will add some internal stuff to the state that is sent to the Authorization server.
|
build, clientCredentials, customParametersExtractorsExprs, encoding, resourceOwnerIdTransformer, responseAccessTokenExpr, responseExpiresInExpr, responseRefreshTokenExpr, scopes, tokenUrl, tokenUrl, tokenUrl, tokenUrl, tokenUrl, withClientCredentialsIn@Deprecated default OAuthAuthorizationCodeDancerBuilder encodeClientCredentialsInBody(boolean encodeClientCredentialsInBody)
OAuthDancerBuilder.withClientCredentialsIn(ClientCredentialsLocation) instead.encodeClientCredentialsInBody - If @{code true}, the client id and client secret will be sent in the request body.
Otherwise, they will be sent as basic authentication.OAuthAuthorizationCodeDancerBuilder localCallback(URL localCallbackUrl)
AuthorizationCodeOAuthDancer will create an HttpServer to listen on the provided
localCallbackUrl.localCallbackUrl - the url to listen onOAuthAuthorizationCodeDancerBuilder localCallback(URL localCallbackUrl, org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
AuthorizationCodeOAuthDancer will create an HttpServer with the provided
tlsContextFactory to listen on the provided localCallbackUrl.localCallbackUrl - the url to listen ontlsContextFactory - the TLS context to use for the listenerOAuthAuthorizationCodeDancerBuilder localCallback(HttpServer server, String localCallbackConfigPath)
AuthorizationCodeOAuthDancer will use an existing HttpServer to listen on the provided
localCallbackConfigPath.server - a server listening on a specific host and portlocalCallbackConfigPath - the path on the server to listen onOAuthAuthorizationCodeDancerBuilder localAuthorizationUrlPath(String path)
localCallback(java.net.URL)) that the user can hit to authenticate and grant access to the application for his account.path - the path to listen for the callbackOAuthAuthorizationCodeDancerBuilder localAuthorizationUrlResourceOwnerId(String localAuthorizationUrlResourceOwnerIdExpr)
localAuthorizationUrlResourceOwnerIdExpr - expression to get the identifier under which the oauth authentication
attributes are stored (accessToken, refreshToken, etc).OAuthAuthorizationCodeDancerBuilder customParameters(Map<String,String> customParameters)
Invoking this method overrides any prior invokations to customParameters(Supplier)
customParameters - the extra parameters to be sent with the authorization request to authorizationUrl(String).OAuthAuthorizationCodeDancerBuilder customParameters(Supplier<Map<String,String>> customParameters)
Invoking this method overrides any prior invokations to customParameters(Map)
customParameters - A Supplier the extra parameters to be sent with the authorization request
to authorizationUrl(String).OAuthAuthorizationCodeDancerBuilder customHeaders(Map<String,String> customHeaders)
Invoking this method overrides any prior invokations to customHeaders(Supplier)
customHeaders - the extra headers to be sent with the authorization request to authorizationUrl(String).OAuthAuthorizationCodeDancerBuilder customHeaders(Supplier<Map<String,String>> customHeaders)
Invoking this method overrides any prior invokations to customParameters(Map)
customHeaders - A Supplier the extra headers to be sent with the authorization request
to authorizationUrl(String).OAuthAuthorizationCodeDancerBuilder state(String stateExpr)
state as specified in this method will be honored.stateExpr - parameter for holding state between the authentication request and the callback done by the OAuth
authorization server to the externalCallbackUrl(String).OAuthAuthorizationCodeDancerBuilder authorizationUrl(String authorizationUrl)
authorizationUrl - The OAuth authentication server url to authorize the app for a certain user.OAuthAuthorizationCodeDancerBuilder externalCallbackUrl(String externalCallbackUrl)
Note: this must be the externally visible address of the localCallback(java.net.URL).
TODO MULE-11861: Allow to infer the localCallback url based on the externalCallbackUrl for Auth-code grant-type
externalCallbackUrl - the callback url where the authorization code will be received.OAuthAuthorizationCodeDancerBuilder beforeDanceCallback(Function<AuthorizationCodeRequest,AuthorizationCodeDanceCallbackContext> callback)
tokenUrl.
The map returned by the provided function will be passed to the afterDanceCallback(BiConsumer), if set.
callback - a Function that receives the parameters that will be used in the executing dance and returns an
AuthorizationCodeDanceCallbackContext to be then passed to the afterDanceCallback(BiConsumer). Not
null.OAuthAuthorizationCodeDancerBuilder afterDanceCallback(BiConsumer<AuthorizationCodeDanceCallbackContext,ResourceOwnerOAuthContext> callback)
tokenUrl and processing its results.callback - a BiConsumer that receives the AuthorizationCodeDanceCallbackContext returned by the callback
passed to beforeDanceCallback(Function) and the OAuth context from the response of the call to
tokenUrl. Not null.OAuthAuthorizationCodeDancerBuilder addListener(AuthorizationCodeListener listener)
listenerlistener - a AuthorizationCodeListenerthis builderIllegalArgumentException - if the listener is nullCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.