Commit Graph
1 Commits
Author SHA1 Message Date
nutcas3 115a10ed66 feat: Add authentication service with JWT token management, session handling, and user operations
- Add JWTService struct with db/secretKey fields and NewJWTService constructor
- Add Claims struct with UserID/Username/Role fields and jwt.RegisteredClaims embedding
- Add GenerateToken method with 15-minute access token, 7-day refresh token, session storage, and inactive session cleanup
- Add ValidateToken method with JWT parsing, HMAC signature verification, and active session validation
- Add validateTokenWithoutSessionCheck for token parsing
2026-04-23 01:55:21 +03:00