Interface ApiAuthorizationProvider

    • Method Detail

      • getAuthorizationHeaderValue

        String getAuthorizationHeaderValue()
        Get the value for the Authorization header that should be added to a request. This method will be called for every request, so always the latest authentication token can be used. If no Authorization header should be added to the request null can be returned.
        Returns:
        the value of the Authorization header or null
      • refreshAccessToken

        boolean refreshAccessToken()
        Callback to initiate a token refresh after a 401 Unauthorized response from the Spotify Web API. If this operation is not supported or failed, return false. A return value of true indicates that the failing request should be retried. The getAuthorizationHeaderValue() method will be called again to get the new header with the new token
        Returns:
        true to indicate to successful token refresh, otherwise false