Packages

package auth

This package contains classes useful for authorization.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. auth
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class AuthCode(clientID: String, clientSecret: String, redirectURI: URI, scopes: List[String] = Nil) extends AuthFlow with Product with Serializable

    The Authorization Code Flow.

    The Authorization Code Flow.

    This flow is suitable for long-running applications in which the user grants permission only once. It provides an access token that can be refreshed. Since the token exchange involves sending your secret key, perform this on a secure location, like a backend service, and not from a client such as a browser or from a mobile app.

    Since the exchange uses your client secret key, to keep the integrity of the key, you should make that request server-side.

    The advantage of this flow is that you can use refresh tokens to extend the validity of the access token.

  2. case class AuthCodeWithPKCE(clientID: String, clientSecret: String, redirectURI: URI, scopes: List[String]) extends AuthFlow with Product with Serializable

    The Authorization Code Flow with Proof Key for Code Exchange (PKCE).

    The Authorization Code Flow with Proof Key for Code Exchange (PKCE).

    The authorization code flow with PKCE is the best option for mobile and desktop applications where it is unsafe to store your client secret. It provides your app with an access token that can be refreshed.

  3. case class AuthError(error: String, errorDescription: String) extends Product with Serializable

    Stores the error response returned whenever the client makes requests related to authorization.

    Stores the error response returned whenever the client makes requests related to authorization. It follows RFC 6749 on the OAuth 2.0 Authorization Framework.

    error

    a high level description of the error as specified in RFC 6749 Section 5.2

    errorDescription

    a more detailed description of the error as specified in RFC 6749 Section 4.1.2.1

  4. class AuthException extends Exception

    An exception issued from an authorization attempt.

  5. sealed trait AuthFlow extends AnyRef

    An authorization flow.

  6. case class AuthObj(accessToken: String, tokenType: String, expiresIn: Long, refreshToken: String = "", scopes: List[String] = Nil) extends Product with Serializable

    Stores the data received upon successful authorization, such as the access token.

  7. case class ClientCredentials(clientID: String, clientSecret: String) extends AuthFlow with Product with Serializable

    The Client Credentials Flow.

    The Client Credentials Flow.

    The Client Credentials flow is used in server-to-server authentication. Only endpoints that do not access user information can be accessed. The advantage here in comparison with requests to the Web API made without an access token, is that a higher rate limit is applied.

    This flow makes it possible to authenticate your requests to the Spotify Web API and to obtain a higher rate limit than you would get without authentication.

    Note: however that this flow does not include authorization and therefore cannot be used to access or to manage a user private data.

Value Members

  1. object AuthError extends Serializable
  2. object AuthObj extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped