Class PasswordResetToken
Represents a token for password reset functionality
Inherited Members
Namespace: OEMS.Core.Domain.Klassen
Assembly: OEMS.Core.dll
Syntax
public class PasswordResetToken
Properties
CreatedAt
When the token was created
Declaration
[Required]
public DateTime CreatedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
ExpiresAt
When the token expires (typically 15-30 minutes from creation)
Declaration
[Required]
public DateTime ExpiresAt { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Id
Unique identifier for the password reset token
Declaration
[Key]
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
Guid |
IsUsed
Whether the token has been used
Declaration
[Required]
public bool IsUsed { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsValid
Checks if the token is valid (not used and not expired)
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
RequestedFromIp
IP address from which the reset was requested (for security logging)
Declaration
[StringLength(45)]
public string? RequestedFromIp { get; set; }
Property Value
Type | Description |
---|---|
string |
Token
The secure token string for password reset
Declaration
[Required]
[StringLength(500)]
public string Token { get; set; }
Property Value
Type | Description |
---|---|
string |
UsedAt
When the token was used
Declaration
public DateTime? UsedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTime? |
User
Navigation property to the associated user
Declaration
public virtual User User { get; set; }
Property Value
Type | Description |
---|---|
User |
UserId
The user ID the token is associated with
Declaration
[Required]
public Guid UserId { get; set; }
Property Value
Type | Description |
---|---|
Guid |