public interface OAuthDancerBuilder<D>
Modifier and Type | Method and Description |
---|---|
D |
build()
Uses the configuration provided to this builder to create a new dancer.
|
OAuthDancerBuilder<D> |
clientCredentials(String clientId,
String clientSecret) |
OAuthDancerBuilder<D> |
customParametersExtractorsExprs(Map<String,String> customParamsExtractorsExprs) |
OAuthDancerBuilder<D> |
encoding(Charset encoding) |
OAuthDancerBuilder<D> |
resourceOwnerIdTransformer(Function<String,String> resourceOwnerIdTransformer)
Allows to partition a
tokensStore and reuse it among different dancers, as long as each dancer has its own proper
resourceOwnerIdStoreTransformer and ensures there can be no collissions between the transformed
respurceOwnerIds for different dancers. |
OAuthDancerBuilder<D> |
responseAccessTokenExpr(String responseAccessTokenExpr) |
OAuthDancerBuilder<D> |
responseExpiresInExpr(String responseExpiresInExpr) |
OAuthDancerBuilder<D> |
responseRefreshTokenExpr(String responseRefreshTokenExpr) |
OAuthDancerBuilder<D> |
scopes(String scopes)
Scopes define permissions over resources.
|
OAuthDancerBuilder<D> |
tokenUrl(HttpClient httpClient,
String tokenUrl)
Mule, after receiving the authentication code from the OAuth server (through the redirectUrl) will call this url to get the
access token.
|
OAuthDancerBuilder<D> |
tokenUrl(String tokenUrl)
Mule, after receiving the authentication code from the OAuth server (through the redirectUrl) will call this url to get the
access token.
|
default OAuthDancerBuilder<D> |
tokenUrl(String tokenUrl,
ProxyConfig proxyConfig)
Mule, after receiving the authentication code from the OAuth server (through the redirectUrl) will call this url to get the
access token.
|
OAuthDancerBuilder<D> |
tokenUrl(String tokenUrl,
TlsContextFactory tlsContextFactory)
Mule, after receiving the authentication code from the OAuth server (through the redirectUrl) will call this url to get the
access token.
|
default OAuthDancerBuilder<D> |
tokenUrl(String tokenUrl,
TlsContextFactory tlsContextFactory,
ProxyConfig proxyConfig)
Mule, after receiving the authentication code from the OAuth server (through the redirectUrl) will call this url to get the
access token.
|
OAuthDancerBuilder<D> clientCredentials(String clientId, String clientSecret)
clientId
- the application identifier as defined in the OAuth authentication server.clientSecret
- the application secret as defined in the OAuth authentication server.OAuthDancerBuilder<D> tokenUrl(String tokenUrl)
tokenUrl
- The OAuth authentication server url to get access to the token.OAuthDancerBuilder<D> tokenUrl(HttpClient httpClient, String tokenUrl)
httpClient
- the HttpClient
that will be used to do the HTTP request for the token during the OAuth dance.tokenUrl
- The OAuth authentication server url to get access to the token.OAuthDancerBuilder<D> tokenUrl(String tokenUrl, TlsContextFactory tlsContextFactory)
tokenUrl
- The OAuth authentication server url to get access to the token.tlsContextFactory
- References a TLS config that will be used to do HTTP request during the OAuth dance.default OAuthDancerBuilder<D> tokenUrl(String tokenUrl, ProxyConfig proxyConfig)
tokenUrl
- The OAuth authentication server url to get access to the token.proxyConfig
- References the proxy configuration which through the HTTP request will go during the request.default OAuthDancerBuilder<D> tokenUrl(String tokenUrl, TlsContextFactory tlsContextFactory, ProxyConfig proxyConfig)
tokenUrl
- The OAuth authentication server url to get access to the token.tlsContextFactory
- References a TLS config that will be used to do HTTP request during the OAuth dance.proxyConfig
- References the proxy configuration which through the HTTP request will go during the request.OAuthDancerBuilder<D> scopes(String scopes)
scopes
- required by this application to execute.OAuthDancerBuilder<D> encoding(Charset encoding)
encoding
- the encoding to use when processing the incoming requests and responses of the OAuth dance.OAuthDancerBuilder<D> responseAccessTokenExpr(String responseAccessTokenExpr)
responseAccessTokenExpr
- an expression to extract the access token
parameter from the response of the call to
token-url
.OAuthDancerBuilder<D> responseRefreshTokenExpr(String responseRefreshTokenExpr)
responseRefreshTokenExpr
- an expression to extract the refresh token
parameter from the response of the call to
token-url
.OAuthDancerBuilder<D> responseExpiresInExpr(String responseExpiresInExpr)
responseExpiresInExpr
- an expression to extract the expiresIn
parameter from the response of the call to
token-url
.OAuthDancerBuilder<D> customParametersExtractorsExprs(Map<String,String> customParamsExtractorsExprs)
customParamsExtractorsExprs
- a map of paramName
to an expression to extract the custom parameters from the
response of the call to token-url
.OAuthDancerBuilder<D> resourceOwnerIdTransformer(Function<String,String> resourceOwnerIdTransformer)
tokensStore
and reuse it among different dancers, as long as each dancer has its own proper
resourceOwnerIdStoreTransformer
and ensures there can be no collissions between the transformed
respurceOwnerIds
for different dancers.
Providing this transformer only affects how the dancer puts the contexts associated to a reosurceOwner
in the
tokensStore
and the name of the locks generated from the lockProvider
The un-transformed value still has to
be used when calling dancer methods that receive the resourceOwnerId
as a parameter, and will be used when sending
data out as part of the OAuth dance or the token refresh.
resourceOwnerIdTransformer
- a transformer to apply to the resourceOwnerId
before using it to access the
provided tokensStore
.D build()
Copyright © 2018. All rights reserved.