Class TOTPRecoveryCodeStorage

java.lang.Object
de.bytestore.hostinger.security.entity.totp.TOTPRecoveryCodeStorage

@Entity(name="secure_TOTPRecoveryCodeStorage") public class TOTPRecoveryCodeStorage extends Object
Represents the storage for TOTP (Time-Based One-Time Password) recovery codes. This entity is used to associate recovery codes with a specific user and optionally a related TOTP storage entity. The recovery codes are encoded in Base64 format. It also maintains metadata such as creation time and creator. Annotations like @JmixEntity and @Table define its database mapping, and it uses indices for efficient lookups by user and TOTP storage. The entity includes the following key fields: - id: A unique identifier for the recovery code storage record. - user: The user associated with the recovery codes. - token: The encoded recovery code value. - totp: An optional reference to related TOTP storage. - createdBy: The user who created this record. - createdDate: The timestamp when this record was created. The @OnDeleteInverse annotation ensures cascade deletion of this entity when the associated user or TOTP storage is deleted. The recovery code token is stored in Base64-encoded format for better management and is decoded when retrieved.
  • Constructor Details

    • TOTPRecoveryCodeStorage

      public TOTPRecoveryCodeStorage()
  • Method Details

    • getToken

      public String getToken()
    • setToken

      public void setToken(String tokenIO)