IRequest.Builderpublic static final class AuthorizationCodeUriRequest.Builder extends AbstractRequest.Builder<AuthorizationCodeUriRequest.Builder>
AuthorizationCodeUriRequest.| Constructor | Description |
|---|---|
Builder() |
| Modifier and Type | Method | Description |
|---|---|---|
AuthorizationCodeUriRequest |
build() |
The request build method.
|
AuthorizationCodeUriRequest.Builder |
client_id(String client_id) |
The client ID setter.
|
AuthorizationCodeUriRequest.Builder |
redirect_uri(URI redirect_uri) |
The redirect URI setter.
|
AuthorizationCodeUriRequest.Builder |
response_type(String response_type) |
The response type setter.
|
AuthorizationCodeUriRequest.Builder |
scope(String scope) |
The scope setter.
|
AuthorizationCodeUriRequest.Builder |
show_dialog(boolean show_dialog) |
The show dialog setter.
|
AuthorizationCodeUriRequest.Builder |
state(String state) |
The state setter.
|
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setSchemepublic AuthorizationCodeUriRequest.Builder client_id(String client_id)
client_id - Required. The client ID provided to you by Spotify when you register your application.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest.Builder response_type(String response_type)
response_type - Required. Set it to code.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest.Builder redirect_uri(URI redirect_uri)
redirect_uri - Required. The URI to redirect to after the user grants/denies permission. This URI needs to
have been entered in the Redirect URI whitelist that you specified when you registered your
application. The value of redirect_uri here must exactly match one of the values you
entered when you registered your application, including upper/lowercase, terminating slashes,
etc.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest.Builder state(String state)
state - Optional, but strongly recommended. The state can be useful for correlating requests and responses.
Because your redirect_uri can be guessed, using a state value can increase your assurance
that an incoming connection is the result of an authentication request. If you generate a random
string or encode the hash of some client state (e.g., a cookie) in this state variable, you can
validate the response to additionally ensure that the request and response originated in the same
browser. This provides protection against attacks such as cross-site request forgery.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest.Builder scope(String scope)
scope - Optional. A space-separated list of scopes. If no scopes are specified, authorization will be
granted only to access publicly available information: that is, only information normally visible in
the Spotify desktop, web and mobile players.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest.Builder show_dialog(boolean show_dialog)
show_dialog - Optional. Whether or not to force the user to approve the app again if they’ve already done
so. If false (default), a user who has already approved the application may be
automatically redirected to the URI specified by redirect_uri. If true, the
user will not be automatically redirected and will have to approve the app again.AuthorizationCodeUriRequest.Builder.public AuthorizationCodeUriRequest build()
AuthorizationCodeUriRequest.Copyright © 2019. All rights reserved.