public interface TokenExchange extends Service, TokenExchangeTypes
TokenExchange interface provides possibility to exchange between
different tokens types. Implementation of "OAuth 2.0 Token Exchange" standard
(https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-12).TokenExchangeTypes.ExchangeSpec, TokenExchangeTypes.Info_VAPI_SERVICE_ID, ACCESS_TOKEN_TYPE, BEARER_TOKEN_METHOD_TYPE, ID_TOKEN_TYPE, N_A_TOKEN_METHOD_TYPE, REFRESH_TOKEN_TYPE, SAML1_TOKEN_TYPE, SAML2_TOKEN_TYPE, TOKEN_EXCHANGE_GRANT| Modifier and Type | Method and Description |
|---|---|
TokenExchangeTypes.Info |
exchange(TokenExchangeTypes.ExchangeSpec spec)
Exchanges incoming token based on the spec and current client authorization
data.
|
void |
exchange(TokenExchangeTypes.ExchangeSpec spec,
AsyncCallback<TokenExchangeTypes.Info> asyncCallback)
Exchanges incoming token based on the spec and current client authorization
data.
|
void |
exchange(TokenExchangeTypes.ExchangeSpec spec,
AsyncCallback<TokenExchangeTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Exchanges incoming token based on the spec and current client authorization
data.
|
TokenExchangeTypes.Info |
exchange(TokenExchangeTypes.ExchangeSpec spec,
InvocationConfig invocationConfig)
Exchanges incoming token based on the spec and current client authorization
data.
|
TokenExchangeTypes.Info exchange(TokenExchangeTypes.ExchangeSpec spec)
Synchronous method overload. Result of the invocation will be reported as a method return value.
spec - ExchangeSpec class contains arguments that define exchange process.TokenExchangeTypes.Info class that
contains new token.InvalidGrant - provided authorization grant (e.g., authorization code, resource owner
credentials) or refresh token is invalid, expired, revoked, does not match the
redirection URI used in the authorization request, or was issued to another
client.InvalidScope - If the server is unwilling or unable to issue a token for all the target
services indicated by the TokenExchangeTypes.ExchangeSpec.getResource() or
TokenExchangeTypes.ExchangeSpec.getAudience()
parameters.Unauthorized - if authorization is not given to a caller.TokenExchangeTypes.Info exchange(TokenExchangeTypes.ExchangeSpec spec, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig to specify configuration for this particular invocation.
spec - ExchangeSpec class contains arguments that define exchange process.invocationConfig - Configuration for the method invocation.TokenExchangeTypes.Info class that
contains new token.InvalidGrant - provided authorization grant (e.g., authorization code, resource owner
credentials) or refresh token is invalid, expired, revoked, does not match the
redirection URI used in the authorization request, or was issued to another
client.InvalidScope - If the server is unwilling or unable to issue a token for all the target
services indicated by the TokenExchangeTypes.ExchangeSpec.getResource() or
TokenExchangeTypes.ExchangeSpec.getAudience()
parameters.Unauthorized - if authorization is not given to a caller.void exchange(TokenExchangeTypes.ExchangeSpec spec, AsyncCallback<TokenExchangeTypes.Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback.
Invocation Result:
TokenExchangeTypes.Info class that
contains new token.
Operation Errors:
InvalidGrant - provided authorization grant (e.g., authorization code, resource owner
credentials) or refresh token is invalid, expired, revoked, does not match the
redirection URI used in the authorization request, or was issued to another
client.
InvalidScope - If the server is unwilling or unable to issue a token for all the target
services indicated by the TokenExchangeTypes.ExchangeSpec.getResource() or
TokenExchangeTypes.ExchangeSpec.getAudience()
parameters.
Unauthorized - if authorization is not given to a caller.
spec - ExchangeSpec class contains arguments that define exchange process.asyncCallback - Receives the status (progress, result or error) of the operation invocation.void exchange(TokenExchangeTypes.ExchangeSpec spec, AsyncCallback<TokenExchangeTypes.Info> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback.
Use invocationConfig to specify configuration for this particular invocation.
Invocation Result:
TokenExchangeTypes.Info class that
contains new token.
Operation Errors:
InvalidGrant - provided authorization grant (e.g., authorization code, resource owner
credentials) or refresh token is invalid, expired, revoked, does not match the
redirection URI used in the authorization request, or was issued to another
client.
InvalidScope - If the server is unwilling or unable to issue a token for all the target
services indicated by the TokenExchangeTypes.ExchangeSpec.getResource() or
TokenExchangeTypes.ExchangeSpec.getAudience()
parameters.
Unauthorized - if authorization is not given to a caller.
spec - ExchangeSpec class contains arguments that define exchange process.asyncCallback - Receives the status (progress, result or error) of the operation invocation.invocationConfig - Configuration for the method invocation.