4 Commits

Author SHA1 Message Date
27f79d4e46
feat(auth): add user management endpoint and update guards
Introduce new "me" endpoints for fetching, updating, and deleting current user data. Update guards to properly inject dependent services using @Inject decorator for better DI handling.
2024-07-24 20:25:46 +02:00
3b201d63fe
refactor(auth): simplify AdminGuard constructor and register it in AuthModule
The AdminGuard constructor is being simplified by using constructor parameter properties, rather than previously setting properties via Reflector in the constructor's body. Additionally, AuthModule now includes AdminGuard in its providers.
2024-07-15 12:16:51 +02:00
dea5f8c48b
feat(auth): use reflector for service injection in guards
The commit refactors how services are injected in UserGuard and AdminGuard inside the auth module. By leveraging the Reflector class from NestJS, it improves the ability to retrieve metadata about these guards, potentially aiding in debugging and understanding code flow.
2024-07-15 11:41:39 +02:00
a157553b78
feat(auth): add UserGuard and AdminGuard
This commit introduces UserGuard and AdminGuard, two new authorization guards. These guards verify the access permissions of users and admin respectively, by checking the provided token in the authorization header. Unauthorized users will receive UnauthorizedException.
2024-07-12 14:08:09 +02:00