public static final class AuthorizationResponse.Builder extends Object
Creates instances of 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 |
fromUri(android.net.Uri uri)
Extracts authorization response parameters from the query portion of a redirect URI.
|
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)
Creates an authorization builder with the specified mandatory properties.
@NonNull public AuthorizationResponse.Builder fromUri(@NonNull android.net.Uri uri)
Extracts authorization response parameters from the query portion of a redirect URI.
@NonNull public AuthorizationResponse.Builder setState(@Nullable String state)
Specifies the OAuth 2 state.
@NonNull public AuthorizationResponse.Builder setTokenType(@Nullable String tokenType)
Specifies the OAuth 2 token type.
@NonNull public AuthorizationResponse.Builder setAuthorizationCode(@Nullable String authorizationCode)
Specifies the OAuth 2 authorization code.
@NonNull public AuthorizationResponse.Builder setAccessToken(@Nullable String accessToken)
Specifies the OAuth 2 access token.
@NonNull public AuthorizationResponse.Builder setAccessTokenExpiresIn(@Nullable Long expiresIn)
Specifies the expiration period of the OAuth 2 access token.
@NonNull public AuthorizationResponse.Builder setAccessTokenExpiresIn(@Nullable Long expiresIn, @NonNull 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.
@NonNull public AuthorizationResponse.Builder setAccessTokenExpirationTime(@Nullable Long expirationTime)
Specifies the expiration time of the OAuth 2 access token.
@NonNull public AuthorizationResponse.Builder setIdToken(@Nullable String idToken)
Specifies the OAuth 2 Id token.
@NonNull public AuthorizationResponse.Builder setScope(@Nullable String scope)
Specifies the encoded scope string, which is a space-delimited set of case-sensitive scope identifiers. Replaces any previously specified scope.
@NonNull public AuthorizationResponse.Builder setScopes(String... scopes)
Specifies the set of case-sensitive scopes. Replaces any previously specified set of scopes. Individual scope strings cannot be null or empty.
@NonNull public AuthorizationResponse.Builder setScopes(@Nullable Iterable<String> scopes)
Specifies the set of case-sensitive scopes. Replaces any previously specified set of scopes. Individual scope strings cannot be null or empty.
@NonNull public AuthorizationResponse.Builder setAdditionalParameters(@Nullable Map<String,String> additionalParameters)
Specifies the additional set of parameters received as part of the response.
@NonNull public AuthorizationResponse build()
Builds the Authorization object.