public static final class TokenResult.Builder
extends java.lang.Object
TokenResult
.Constructor and Description |
---|
Builder(char[] accessToken,
java.lang.String tokenType)
Constructor with parameters for the required properties of
TokenResult . |
Modifier and Type | Method and Description |
---|---|
TokenResult |
build() |
TokenResult.Builder |
setExpiresIn(java.lang.Long expiresIn)
The validity lifetime, in seconds, of the token issued by the server.
|
TokenResult.Builder |
setIssuedTokenType(java.lang.String issuedTokenType)
An identifier which indicates the type of the access token in the
TokenResult.getAccessToken() property. |
TokenResult.Builder |
setRefreshToken(char[] refreshToken)
The refresh token, which can be used to obtain new access tokens.
|
TokenResult.Builder |
setScope(java.lang.String scope)
Scope of the issued access token.
|
public Builder(char[] accessToken, java.lang.String tokenType)
TokenResult
.public TokenResult.Builder setExpiresIn(java.lang.Long expiresIn)
null
if not applicable for issued token.expiresIn
- New value for the property.public TokenResult.Builder setScope(java.lang.String scope)
The value of the scope parameter is expressed as a list of space- delimited, case-sensitive strings. The strings are defined by the authorization server. If the value contains multiple space-delimited strings, their order does not matter, and each string adds an additional access range to the requested scope.
. This property was added in vSphere API 8.0.3.0.null
if the scope of the issued security token is identical to the scope
requested by the client.scope
- New value for the property.public TokenResult.Builder setRefreshToken(char[] refreshToken)
null
if not applicable to the specific request.refreshToken
- New value for the property.public TokenResult.Builder setIssuedTokenType(java.lang.String issuedTokenType)
TokenResult.getAccessToken()
property. This property was added
in vSphere API 8.0.3.0.
null
if not the result of a token-exchange invocation; otherwise,
required.issuedTokenType
- New value for the property.public TokenResult build()