* Make JwtGuard better

* Fix auth decorators
This commit is contained in:
Philipinho
2024-02-28 03:07:24 +00:00
parent 40251aef7d
commit cdcb4e87d0
14 changed files with 155 additions and 136 deletions

View File

@ -24,6 +24,10 @@ export class AuthenticationExtension implements Extension {
const userId = jwtPayload.sub;
const user = await this.userService.findById(userId);
if (!user) {
throw new UnauthorizedException();
}
//TODO: Check if the page exists and verify user permissions for page.
// if all fails, abort connection