Package-level declarations

Types

Link copied to clipboard
data class AuthConfig(val clientId: String, val clientUniqueKey: String? = null, val clientSecret: String? = null, val credentialsKey: String, val scopes: Set<String> = setOf(), val tidalLoginServiceBaseUrl: String = DEFAULT_LOGIN_SERVICE_BASE_URL, val tidalAuthServiceBaseUrl: String = DEFAULT_AUTH_SERVICE_BASE_URL, val enableCertificatePinning: Boolean = true, val logLevel: NetworkLogLevel = NetworkLogLevel.NONE)

Configuration object for the Auth module.

Link copied to clipboard
class AuthorizationError(val code: String, val subStatus: Int? = null, val throwable: Throwable? = null) : TidalError

Error indicating that the user did not correctly authenticate themselves at the TIDAL login service. Raised when the URI made to the redirect URI indicates that the authentication was not succesful.

Link copied to clipboard
sealed class AuthResult<out T>
Link copied to clipboard
@Serializable
data class Credentials(val clientId: String, val requestedScopes: Set<String>, val clientUniqueKey: String?, val grantedScopes: Set<String>, val userId: String?, val expires: Instant?, val token: String?)

Represents the credentials of a user or client.

Link copied to clipboard
data class CredentialsUpdatedMessage(val credentials: Credentials? = null) : TidalMessage

Message sent on the CredentialsProvider.bus when credentials are updated.

Link copied to clipboard
@Serializable
data class DeviceAuthorizationResponse(val deviceCode: String, val userCode: String, val verificationUri: String, val verificationUriComplete: String?, val expiresIn: Int, val interval: Int)
Link copied to clipboard
data class LoginConfig(val locale: Locale? = Locale.getDefault(), val email: String? = null, val customParams: Set<QueryParameter> = setOf())

Configuration parameters for the TIDAL login service.

Link copied to clipboard
data class QueryParameter(val key: String, val value: String)

Represents a query parameter.

Link copied to clipboard
class TokenResponseError(val code: String, val subStatus: Int? = null, val throwable: Throwable? = null) : TidalError

Error used to indicate that an access token could not be retrieved.

Functions

Link copied to clipboard
fun failure(message: TidalMessage? = null): AuthResult.Failure

Creates a AuthResult.Failure with all fields

Link copied to clipboard
fun <T> success(data: T?): AuthResult.Success<T & Any>

Creates a AuthResult.Success with data payload