TokenModel

@Serializable
data class TokenModel(val userId: Uuid, val username: String, val accessToken: String, val refreshToken: String, val expiresIn: Long) : Principal

A model representing a pair of authentication tokens.

Constructors

Link copied to clipboard
constructor(userId: Uuid, username: String, accessToken: String, refreshToken: String, expiresIn: Long)

Properties

Link copied to clipboard
@SerialName(value = "access_token")
val accessToken: String
Link copied to clipboard
@SerialName(value = "expires_in")
val expiresIn: Long
Link copied to clipboard
@SerialName(value = "refresh_token")
val refreshToken: String
Link copied to clipboard

Converts this token pair into a TokenResponseModel that only includes the access token and Principal fields.

Link copied to clipboard
@SerialName(value = "user_id")
open override val userId: Uuid

The unique identifier for the user.

Link copied to clipboard
open override val username: String

The username of the user.