public class TokenExchangeStub extends com.vmware.vapi.internal.bindings.Stub implements TokenExchange
TokenExchange
API service.
WARNING: Internal class, subject to change in future versions.
TokenExchangeTypes.ExchangeSpec, TokenExchangeTypes.Info
apiProvider, converter, ifaceId, retryPolicy, securityContext
_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
Constructor and Description |
---|
TokenExchangeStub(ApiProvider apiProvider,
StubConfigurationBase config) |
TokenExchangeStub(ApiProvider apiProvider,
com.vmware.vapi.internal.bindings.TypeConverter typeConverter,
StubConfigurationBase config) |
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.
|
public TokenExchangeStub(ApiProvider apiProvider, com.vmware.vapi.internal.bindings.TypeConverter typeConverter, StubConfigurationBase config)
public TokenExchangeStub(ApiProvider apiProvider, StubConfigurationBase config)
public TokenExchangeTypes.Info exchange(TokenExchangeTypes.ExchangeSpec spec)
TokenExchange
Synchronous method overload. Result of the invocation will be reported as a method return value.
exchange
in interface TokenExchange
spec
- ExchangeSpec
class contains arguments that define exchange process.TokenExchangeTypes.Info
class that
contains new token.public TokenExchangeTypes.Info exchange(TokenExchangeTypes.ExchangeSpec spec, InvocationConfig invocationConfig)
TokenExchange
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
exchange
in interface TokenExchange
spec
- ExchangeSpec
class contains arguments that define exchange process.invocationConfig
- Configuration for the method invocation.TokenExchangeTypes.Info
class that
contains new token.public void exchange(TokenExchangeTypes.ExchangeSpec spec, AsyncCallback<TokenExchangeTypes.Info> asyncCallback)
TokenExchange
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.
exchange
in interface TokenExchange
spec
- ExchangeSpec
class contains arguments that define exchange process.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.public void exchange(TokenExchangeTypes.ExchangeSpec spec, AsyncCallback<TokenExchangeTypes.Info> asyncCallback, InvocationConfig invocationConfig)
TokenExchange
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.
exchange
in interface TokenExchange
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.