UserCredentials

data class UserCredentials(val id: UserId, val passwordHash: String, val salt: String, val loginAttempts: Int = 0, val lockedUntil: Long = -1L, val lastLogin: Long = 0) : Entity<UserId>

Represents the credentials of a user in the domain model.

Constructors

Link copied to clipboard
constructor(id: UserId, passwordHash: String, salt: String, loginAttempts: Int = 0, lockedUntil: Long = -1L, lastLogin: Long = 0)

Properties

Link copied to clipboard
open override val id: UserId

The unique identifier for the user, represented as a UserId.

Link copied to clipboard

The timestamp (in milliseconds) of the user's last successful login. Defaults to 0L.

Link copied to clipboard

The timestamp (in milliseconds) until which the account is locked. Defaults to -1L, indicating no lock.

Link copied to clipboard

The number of failed login attempts. Defaults to 0.

Link copied to clipboard

The hashed password of the user, used for authentication.

Link copied to clipboard

The cryptographic salt used during password hashing for added security.