添加项目文件。
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace IM.Jwt
|
||||
{
|
||||
public interface ITokenService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取令牌
|
||||
/// </summary>
|
||||
/// <param name="claims">令牌负载</param>
|
||||
/// <param name="options"></param>
|
||||
/// <returns></returns>
|
||||
string GetToken(IEnumerable<Claim> claims, JwtOptions options);
|
||||
Task<string> CreateRefreshTokenAsync(Guid userId, CancellationToken cancellationToken = default);
|
||||
Task RevokeRefreshTokenAsync(string refreshToken);
|
||||
Task<(bool ok, Guid userId)> ValidateRefreshTokenAsync(string token, CancellationToken cancellation = default);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user