public class TwoFactorAuthUtils extends Object
| Constructor and Description |
|---|
TwoFactorAuthUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateOtpAuthUrl(String userName,
String tfaKey)
生成 Otp Auth Url
|
static String |
generateTFACode(String tfaKey)
生成两步验证码
|
static String |
generateTFAKey()
生成两步验证 Key
|
static boolean |
validateTFACode(String tfaKey,
String tfaCode)
验证两步验证码
|
public static String generateTFAKey()
public static String generateTFACode(String tfaKey)
tfaKey - 两步验证 Keypublic static boolean validateTFACode(String tfaKey, String tfaCode)
tfaKey - 两步验证 KeytfaCode - 两步验证码Copyright © 2017–2022. All rights reserved.