Class AuthorizationCodeCredentials
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject
com.wrapper.spotify.model_objects.credentials.AuthorizationCodeCredentials
- All Implemented Interfaces:
IModelObject
public class AuthorizationCodeCredentials extends AbstractModelObject
Retrieve information about
Authorization Code
Credentials by building instances from this class.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthorizationCodeCredentials.BuilderBuilder class for buildingAuthorizationCodeCredentialsinstances.static classAuthorizationCodeCredentials.JsonUtilJsonUtil class for buildingAuthorizationCodeCredentialsinstances.Nested classes/interfaces inherited from interface com.wrapper.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and Type Method Description AuthorizationCodeCredentials.Builderbuilder()Create a builder for building an instance of a model object.StringgetAccessToken()Get the access token.IntegergetExpiresIn()Get the time period (in seconds) for which the access token is valid.StringgetRefreshToken()Get the refresh token.StringgetScope()Get the Scopes specified in the authorization code credentials request.StringgetTokenType()Get the type of an access token, which will always be "Bearer".
-
Method Details
-
getAccessToken
Get the access token. It becomes invalid after a certain period of time.- Returns:
- An access token that can be provided in subsequent calls, for example to Spotify Web API services.
-
getTokenType
Get the type of an access token, which will always be "Bearer".- Returns:
- How the access token may be used: always "Bearer".
-
getScope
Get the Scopes specified in the authorization code credentials request.- Returns:
- The scopes specified in the credentials request.
-
getExpiresIn
Get the time period (in seconds) for which the access token is valid.- Returns:
- The time period (in seconds) for which the access token is valid.
-
getRefreshToken
Get the refresh token. This token can be sent to the Spotify Accounts service in place of an authorization code to retrieve a new access token.- Returns:
- A token that can be sent to the Spotify Accounts service in place of an access token.
-
builder
Description copied from interface:IModelObjectCreate a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Returns:
- A builder object.
-