Class AuthorizationResponse

java.lang.Object
com.spotify.sdk.android.auth.AuthorizationResponse
All Implemented Interfaces:
Parcelable

public class AuthorizationResponse extends Object implements Parcelable
An object that contains the parsed response from the Spotify authorization service. To create one use AuthorizationResponse.Builder or parse from Uri with fromUri(android.net.Uri)
See Also:
  • Field Details

  • Constructor Details

    • AuthorizationResponse

      public AuthorizationResponse(@NonNull Parcel source)
  • Method Details

    • fromUri

      @NonNull public static AuthorizationResponse fromUri(@Nullable Uri uri)
      Parses the URI returned from the Spotify accounts service.
      Parameters:
      uri - URI
      Returns:
      Authorization response. If parsing failed, this object will be populated with the given error codes.
    • getType

      @NonNull public AuthorizationResponse.Type getType()
    • getCode

      @Nullable public String getCode()
    • getAccessToken

      @Nullable public String getAccessToken()
    • getState

      @Nullable public String getState()
    • getError

      @Nullable public String getError()
    • getExpiresIn

      public int getExpiresIn()
    • getRefreshToken

      @Nullable public String getRefreshToken()
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface Parcelable
    • writeToParcel

      public void writeToParcel(@NonNull Parcel dest, int flags)
      Specified by:
      writeToParcel in interface Parcelable