SPMS_API/SPMS.Application/Interfaces/IJwtService.cs
SEAN bf8f82e66c improvement: 로그아웃 시 Access Token 즉시 무효화 (#169)
- IJwtService/JwtService에 GetTokenInfo(JTI, 만료시간 추출) 추가
- LogoutAsync에 Redis 블랙리스트 로직 추가 (key: blacklist:{jti}, TTL: 남은 만료시간)
- AuthenticationExtensions OnTokenValidated에서 블랙리스트 체크
- 로그아웃 후 동일 Access Token 재사용 시 401 반환

Closes #169
2026-02-24 17:33:37 +09:00

12 lines
346 B
C#

using System.Security.Claims;
namespace SPMS.Application.Interfaces;
public interface IJwtService
{
string GenerateAccessToken(long adminId, string role, string? serviceCode = null);
ClaimsPrincipal? ValidateAccessToken(string token);
string GenerateRefreshToken();
(string? Jti, DateTime ValidTo) GetTokenInfo(string token);
}