Class AuthorizationCodeUriRequest.Builder
- java.lang.Object
-
- com.wrapper.spotify.requests.AbstractRequest.Builder<AuthorizationCodeUriRequest.Builder>
-
- com.wrapper.spotify.requests.authorization.authorization_code.AuthorizationCodeUriRequest.Builder
-
- All Implemented Interfaces:
IRequest.Builder
- Enclosing class:
- AuthorizationCodeUriRequest
public static final class AuthorizationCodeUriRequest.Builder extends AbstractRequest.Builder<AuthorizationCodeUriRequest.Builder>
Builder class for building anAuthorizationCodeUriRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationCodeUriRequestbuild()The request build method.AuthorizationCodeUriRequest.Builderclient_id(String client_id)The client ID setter.AuthorizationCodeUriRequest.Builderredirect_uri(URI redirect_uri)The redirect URI setter.AuthorizationCodeUriRequest.Builderresponse_type(String response_type)The response type setter.AuthorizationCodeUriRequest.Builderscope(String scope)The scope setter.AuthorizationCodeUriRequest.Buildershow_dialog(boolean show_dialog)The show dialog setter.AuthorizationCodeUriRequest.Builderstate(String state)The state setter.-
Methods inherited from class com.wrapper.spotify.requests.AbstractRequest.Builder
setBody, setBodyParameter, setContentType, setDefaults, setHeader, setHost, setHttpManager, setPath, setPathParameter, setPort, setQueryParameter, setScheme
-
-
-
-
Method Detail
-
client_id
public AuthorizationCodeUriRequest.Builder client_id(String client_id)
The client ID setter.- Parameters:
client_id- Required. The client ID provided to you by Spotify when you register your application.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
response_type
public AuthorizationCodeUriRequest.Builder response_type(String response_type)
The response type setter.- Parameters:
response_type- Required. Set it tocode.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
redirect_uri
public AuthorizationCodeUriRequest.Builder redirect_uri(URI redirect_uri)
The redirect URI setter.- Parameters:
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 ofredirect_urihere must exactly match one of the values you entered when you registered your application, including upper/lowercase, terminating slashes, etc.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
state
public AuthorizationCodeUriRequest.Builder state(String state)
The state setter.- Parameters:
state- Optional, but strongly recommended. The state can be useful for correlating requests and responses. Because yourredirect_urican 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.- Returns:
- An
AuthorizationCodeUriRequest.Builder. - See Also:
- RFC 6749: Cross-Site Request Forgery
-
scope
public AuthorizationCodeUriRequest.Builder scope(String scope)
The scope setter.- Parameters:
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.- Returns:
- An
AuthorizationCodeUriRequest.Builder. - See Also:
- Spotify: Using Scopes
-
show_dialog
public AuthorizationCodeUriRequest.Builder show_dialog(boolean show_dialog)
The show dialog setter.- Parameters:
show_dialog- Optional. Whether or not to force the user to approve the app again if they’ve already done so. Iffalse(default), a user who has already approved the application may be automatically redirected to the URI specified byredirect_uri. Iftrue, the user will not be automatically redirected and will have to approve the app again.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
build
public AuthorizationCodeUriRequest build()
The request build method.- Returns:
- An
AuthorizationCodeUriRequest.
-
-