Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ApiKeyCreatedModel(val id: Uuid, val name: String, val key: String, val prefix: String, val expiresAt: Long? = null)

The response returned when a new API key is created.

Link copied to clipboard
@Serializable
data class ApiKeyInfoModel(val id: Uuid, val name: String, val prefix: String, val createdAt: Long, val expiresAt: Long? = null, val lastUsedAt: Long? = null, val revoked: Boolean = false)

Metadata about an existing API key, deliberately excluding the raw key.

Link copied to clipboard
@Serializable
data class ApiKeyRequestModel(val name: String, val expiresInDays: Long? = null)

A request to create a new API key.

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
data class TokenResponseModel(val userId: Uuid, val username: String, val accessToken: String, val expiresIn: Long) : Principal

A model representing a token response and Principal to be sent to the client.

Link copied to clipboard
@Serializable
data class UserRequestModel(val username: String, val email: String, val password: String)

A standard request model for user authentication.