Add refresh token rotation in AuthModule.

This commit is contained in:
Halite Demo 2026-08-16 12:42:22 +05:00
parent b8664e15b1
commit 2d282da20f

View File

@ -1,8 +1,13 @@
export class AuthModule { export class AuthModule {
/** JWT authentication service — matches Halite component path. */ /** JWT authentication service — matches Halite component path. */
validateAccessToken(token: string): boolean { validateAccessToken(token: string): boolean {
if (!token) return false; if (!token) return false;
const parts = token.split("."); const parts = token.split(".");
return parts.length === 3; return parts.length === 3;
} }
/** Ticket #42 — refresh token rotation (demo change for invalidation). */
rotateRefreshToken(oldToken: string): string {
return `rotated:${oldToken}`;
}
} }