Add refresh token rotation in AuthModule.
This commit is contained in:
parent
b8664e15b1
commit
2d282da20f
@ -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}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user