public interface Token extends Service, TokenTypes
Token interface provides operations for obtaining an access token.TokenTypes.IssueSpec_VAPI_SERVICE_ID| Modifier and Type | Method and Description |
|---|---|
TokenInfo |
issue(TokenTypes.IssueSpec spec)
Provides a token endpoint as defined in RFC 6749.
|
void |
issue(TokenTypes.IssueSpec spec,
AsyncCallback<TokenInfo> asyncCallback)
Provides a token endpoint as defined in RFC 6749.
|
void |
issue(TokenTypes.IssueSpec spec,
AsyncCallback<TokenInfo> asyncCallback,
InvocationConfig invocationConfig)
Provides a token endpoint as defined in RFC 6749.
|
TokenInfo |
issue(TokenTypes.IssueSpec spec,
InvocationConfig invocationConfig)
Provides a token endpoint as defined in RFC 6749.
|
TokenInfo issue(TokenTypes.IssueSpec spec)
Supported grant types:
This
method supercedes com.vmware.vcenter.tokenservice.TokenExchange#exchange. The REST rendering of
the newer operation matches RFC8693's definition for both input and output of
the method.
Synchronous method overload. Result of the invocation will be reported as a method return value.
spec - IssueSpec class containing arguments that define the exchange process.TokenInfo class that contains a newly issued token.InvalidRequest - if TokenTypes.IssueSpec is missing a
required property, includes an unsupported property value (other than TokenTypes.IssueSpec.getGrantType()).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 TokenTypes.IssueSpec.getResource() or TokenTypes.IssueSpec.getAudience() properties.TokenInfo issue(TokenTypes.IssueSpec spec, InvocationConfig invocationConfig)
Supported grant types:
This
method supercedes com.vmware.vcenter.tokenservice.TokenExchange#exchange. The REST rendering of
the newer operation matches RFC8693's definition for both input and output of
the method.
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 - IssueSpec class containing arguments that define the exchange process.invocationConfig - Configuration for the method invocation.TokenInfo class that contains a newly issued token.InvalidRequest - if TokenTypes.IssueSpec is missing a
required property, includes an unsupported property value (other than TokenTypes.IssueSpec.getGrantType()).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 TokenTypes.IssueSpec.getResource() or TokenTypes.IssueSpec.getAudience() properties.void issue(TokenTypes.IssueSpec spec, AsyncCallback<TokenInfo> asyncCallback)
Supported grant types:
This
method supercedes com.vmware.vcenter.tokenservice.TokenExchange#exchange. The REST rendering of
the newer operation matches RFC8693's definition for both input and output of
the method.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback.
Invocation Result:
TokenInfo class that contains a newly issued token.
Operation Errors:
InvalidRequest - if TokenTypes.IssueSpec is missing a
required property, includes an unsupported property value (other than TokenTypes.IssueSpec.getGrantType()).
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 TokenTypes.IssueSpec.getResource() or TokenTypes.IssueSpec.getAudience() properties.
spec - IssueSpec class containing arguments that define the exchange process.asyncCallback - Receives the status (progress, result or error) of the operation invocation.void issue(TokenTypes.IssueSpec spec, AsyncCallback<TokenInfo> asyncCallback, InvocationConfig invocationConfig)
Supported grant types:
This
method supercedes com.vmware.vcenter.tokenservice.TokenExchange#exchange. The REST rendering of
the newer operation matches RFC8693's definition for both input and output of
the method.
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:
TokenInfo class that contains a newly issued token.
Operation Errors:
InvalidRequest - if TokenTypes.IssueSpec is missing a
required property, includes an unsupported property value (other than TokenTypes.IssueSpec.getGrantType()).
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 TokenTypes.IssueSpec.getResource() or TokenTypes.IssueSpec.getAudience() properties.
spec - IssueSpec class containing arguments that define the exchange process.asyncCallback - Receives the status (progress, result or error) of the operation invocation.invocationConfig - Configuration for the method invocation.