UserCredentialsDocument

@MappedEntity
data class UserCredentialsDocument(val id: String, val passwordHash: String, val salt: String, val loginAttempts: Int, val lockedUntil: Long, val lastLogin: Long)

Represents the MongoDB document for storing user credentials.

This class is annotated with @MappedEntity to indicate that it maps to a MongoDB collection. Each instance of this class corresponds to a document in the collection.

Constructors

Link copied to clipboard
constructor(id: String, passwordHash: String, salt: String, loginAttempts: Int, lockedUntil: Long, lastLogin: Long)

Properties

Link copied to clipboard
@Id
val id: String

The unique identifier for the user credentials document. This is the primary key.

Link copied to clipboard

The timestamp (in milliseconds) of the user's last successful login.

Link copied to clipboard

The timestamp (in milliseconds) until which the account is locked. A value of 0 or negative indicates no lock.

Link copied to clipboard

The number of failed login attempts. Used for tracking account lockout policies.

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.