public static final class AuthorizationRequest.Builder extends Object
AuthorizationRequest
.Constructor and Description |
---|
Builder(AuthorizationServiceConfiguration configuration,
String clientId,
String responseType,
Uri redirectUri)
Creates an authorization request builder with the specified mandatory properties.
|
Modifier and Type | Method and Description |
---|---|
AuthorizationRequest |
build()
Constructs the authorization request.
|
AuthorizationRequest.Builder |
setAdditionalParameters(Map<String,String> additionalParameters)
Specifies additional parameters.
|
AuthorizationRequest.Builder |
setAuthorizationServiceConfiguration(AuthorizationServiceConfiguration configuration)
Specifies the service configuration to be used in dispatching this request.
|
AuthorizationRequest.Builder |
setClientId(String clientId)
Specifies the client ID.
|
AuthorizationRequest.Builder |
setCodeVerifier(String codeVerifier)
Specifies the code verifier to use for this authorization request.
|
AuthorizationRequest.Builder |
setCodeVerifier(String codeVerifier,
String codeVerifierChallenge,
String codeVerifierChallengeMethod)
Specifies the code verifier, challenge and method strings to use for this authorization
request.
|
AuthorizationRequest.Builder |
setRedirectUri(Uri redirectUri)
Specifies the client's redirect URI.
|
AuthorizationRequest.Builder |
setResponseMode(String responseMode)
Specifies the response mode to be used for returning authorization response parameters
from the authorization endpoint.
|
AuthorizationRequest.Builder |
setResponseType(String responseType)
Specifies the expected response type.
|
AuthorizationRequest.Builder |
setScope(String scope)
Specifies the encoded scope string, which is a space-delimited set of
case-sensitive scope identifiers.
|
AuthorizationRequest.Builder |
setScopes(Iterable<String> scopes)
Specifies the set of case-sensitive scopes.
|
AuthorizationRequest.Builder |
setScopes(String... scopes)
Specifies the set of case-sensitive scopes.
|
AuthorizationRequest.Builder |
setState(String state)
Specifies the opaque value used by the client to maintain state between the request and
callback.
|
public AuthorizationRequest.Builder setAuthorizationServiceConfiguration(@NonNull AuthorizationServiceConfiguration configuration)
@NonNull public AuthorizationRequest.Builder setClientId(@NonNull String clientId)
@NonNull public AuthorizationRequest.Builder setResponseType(@NonNull String responseType)
@NonNull public AuthorizationRequest.Builder setRedirectUri(@NonNull Uri redirectUri)
@NonNull public AuthorizationRequest.Builder setScope(@Nullable String scope)
@NonNull public AuthorizationRequest.Builder setScopes(String... scopes)
null
.
Individual scope strings cannot be null or empty.@NonNull public AuthorizationRequest.Builder setScopes(@Nullable Iterable<String> scopes)
null
.
Individual scope strings cannot be null or empty.@NonNull public AuthorizationRequest.Builder setState(@Nullable String state)
@NonNull public AuthorizationRequest.Builder setCodeVerifier(@Nullable String codeVerifier)
AuthorizationRequest.CODE_CHALLENGE_METHOD_S256
) implemented by
CodeVerifierUtil
will be used, and a challenge will be generated using this
method. If the use of a code verifier is not desired, set the code verifier
to null
.@NonNull public AuthorizationRequest.Builder setCodeVerifier(@Nullable String codeVerifier, @Nullable String codeVerifierChallenge, @Nullable String codeVerifierChallengeMethod)
@NonNull public AuthorizationRequest.Builder setResponseMode(@Nullable String responseMode)
@NonNull public AuthorizationRequest.Builder setAdditionalParameters(@NonNull Map<String,String> additionalParameters)
@NonNull public AuthorizationRequest build()