public static final class AuthorizationResponse.Builder extends Object
AuthorizationResponse
.Constructor and Description |
---|
Builder(AuthorizationRequest request)
Creates an authorization builder with the specified mandatory properties.
|
Modifier and Type | Method and Description |
---|---|
AuthorizationResponse |
build()
Builds the Authorization object.
|
AuthorizationResponse.Builder |
setAccessToken(String accessToken)
Specifies the OAuth 2 access token.
|
AuthorizationResponse.Builder |
setAccessTokenExpirationTime(Long expirationTime)
Specifies the expiration time of the OAuth 2 access token.
|
AuthorizationResponse.Builder |
setAccessTokenExpiresIn(Long expiresIn)
Specifies the expiration period of the OAuth 2 access token.
|
AuthorizationResponse.Builder |
setAccessTokenExpiresIn(Long expiresIn,
net.openid.appauth.Clock clock)
Specifies the relative expiration time of the access token, in seconds, using the
provided clock as the source of the current time.
|
AuthorizationResponse.Builder |
setAdditionalParameters(Map<String,String> additionalParameters)
Specifies the additional set of parameters received as part of the response.
|
AuthorizationResponse.Builder |
setAuthorizationCode(String authorizationCode)
Specifies the OAuth 2 authorization code.
|
AuthorizationResponse.Builder |
setIdToken(String idToken)
Specifies the OAuth 2 Id token.
|
AuthorizationResponse.Builder |
setScope(String scope)
Specifies the encoded scope string, which is a space-delimited set of
case-sensitive scope identifiers.
|
AuthorizationResponse.Builder |
setScopes(Iterable<String> scopes)
Specifies the set of case-sensitive scopes.
|
AuthorizationResponse.Builder |
setScopes(String... scopes)
Specifies the set of case-sensitive scopes.
|
AuthorizationResponse.Builder |
setState(String state)
Specifies the OAuth 2 state.
|
AuthorizationResponse.Builder |
setTokenType(String tokenType)
Specifies the OAuth 2 token type.
|
public Builder(@NonNull AuthorizationRequest request)
@NonNull public AuthorizationResponse.Builder setState(@Nullable String state)
@NonNull public AuthorizationResponse.Builder setTokenType(@Nullable String tokenType)
@NonNull public AuthorizationResponse.Builder setAuthorizationCode(@Nullable String authorizationCode)
@NonNull public AuthorizationResponse.Builder setAccessToken(@Nullable String accessToken)
@NonNull public AuthorizationResponse.Builder setAccessTokenExpiresIn(@Nullable Long expiresIn)
@NonNull public AuthorizationResponse.Builder setAccessTokenExpiresIn(@Nullable Long expiresIn, @NonNull net.openid.appauth.Clock clock)
@NonNull public AuthorizationResponse.Builder setAccessTokenExpirationTime(@Nullable Long expirationTime)
@NonNull public AuthorizationResponse.Builder setIdToken(@Nullable String idToken)
@NonNull public AuthorizationResponse.Builder setScope(@Nullable String scope)
@NonNull public AuthorizationResponse.Builder setScopes(String... scopes)
@NonNull public AuthorizationResponse.Builder setScopes(@Nullable Iterable<String> scopes)
@NonNull public AuthorizationResponse.Builder setAdditionalParameters(@Nullable Map<String,String> additionalParameters)
@NonNull public AuthorizationResponse build()