You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
namespace Sanhe.Abp.Identity |
|
{ |
|
/// <summary> |
|
/// 短信安全令牌验证缓存 |
|
/// </summary> |
|
public class SmsSecurityTokenCacheItem |
|
{ |
|
/// <summary> |
|
/// 用于验证的Token |
|
/// </summary> |
|
public string Token { get; set; } |
|
/// <summary> |
|
/// 用于验证的安全令牌 |
|
/// </summary> |
|
public string SecurityToken { get; set; } |
|
|
|
public SmsSecurityTokenCacheItem() |
|
{ |
|
|
|
} |
|
|
|
public SmsSecurityTokenCacheItem(string token, string securityToken) |
|
{ |
|
Token = token; |
|
SecurityToken = securityToken; |
|
} |
|
|
|
/// <summary> |
|
/// 生成查询Key |
|
/// </summary> |
|
/// <param name="phoneNumber">手机号</param> |
|
/// <param name="purpose">安全令牌用途</param> |
|
/// <returns></returns> |
|
public static string CalculateCacheKey(string phoneNumber, string purpose) |
|
{ |
|
return "Totp:" + purpose + ";p:" + phoneNumber; |
|
} |
|
} |
|
}
|
|
|