feat: implement session delete using redis

This commit is contained in:
Muyao CHEN
2024-10-15 10:14:40 +02:00
parent 2fe834fe55
commit 1fb84a3ff4
16 changed files with 350 additions and 16 deletions

View File

@ -43,6 +43,7 @@ type Claims struct {
}
type TokenResp struct {
Raw string
Identity string
Expiry time.Time
}
@ -91,6 +92,7 @@ func Parse(tokenString string) (*TokenResp, error) {
if claims, ok := token.Claims.(*Claims); ok {
return &TokenResp{
tokenString,
claims.IdentityKey,
claims.ExpiresAt.Time,
}, nil