XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEServerManager

【Java】我的世界XFE服务器管理器

公开
关注 0 Fork 0 Star 0
UTF-8
package com.xfestudio.xfeservermanager.infra.security;

import java.time.Instant;
import java.util.UUID;

public record AccountRecord(
        UUID id,
        String username,
        String normalizedUsername,
        String passwordHash,
        Role role,
        byte[] encryptedTotpSecret,
        boolean totpEnabled,
        boolean disabled,
        Instant createdAt,
        Instant updatedAt,
        Instant lastLoginAt) {

    public AccountRecord {
        encryptedTotpSecret = encryptedTotpSecret == null ? null : encryptedTotpSecret.clone();
    }

    @Override
    public byte[] encryptedTotpSecret() {
        return encryptedTotpSecret == null ? null : encryptedTotpSecret.clone();
    }
}