UserSession

@Serializable
data class UserSession(val accessToken: String, val refreshToken: String, val providerRefreshToken: String? = null, val providerToken: String? = null, val expiresIn: Long, val tokenType: String, val user: UserInfo? = null, val type: String = "", val expiresAt: Instant = Clock.System.now() + (expiresIn.seconds))(source)

Constructors

Link copied to clipboard
constructor(accessToken: String, refreshToken: String, providerRefreshToken: String? = null, providerToken: String? = null, expiresIn: Long, tokenType: String, user: UserInfo? = null, type: String = "", expiresAt: Instant = Clock.System.now() + (expiresIn.seconds))

Properties

Link copied to clipboard
@SerialName(value = "access_token")
val accessToken: String
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "expires_in")
val expiresIn: Long
Link copied to clipboard
@SerialName(value = "provider_refresh_token")
val providerRefreshToken: String?
Link copied to clipboard
@SerialName(value = "provider_token")
val providerToken: String?
Link copied to clipboard
@SerialName(value = "refresh_token")
val refreshToken: String
Link copied to clipboard
@SerialName(value = "token_type")
val tokenType: String
Link copied to clipboard
@SerialName(value = "type")
val type: String
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String

Renders this session with accessToken, refreshToken, providerToken and providerRefreshToken masked. Use unsafeToString for the raw values.

Link copied to clipboard

Renders this session with the raw, unmasked token values. Intended for debugging only, never log the result.