5 Commits

Author SHA1 Message Date
b558d344e1
fix(credentials): handle token verification errors
Added try-catch block in verifyAuthToken to handle and log JWT verification errors. This change ensures that invalid tokens are caught and a relevant BadRequestException is thrown.
2024-07-24 20:26:53 +02:00
5a5a8c1114
style(credentials): correct syntax and improve formatting in CredentialsService
This commit corrects a minor syntax error by adding missing semicolons on two lines. It also tidies up code by improving the formatting in the constructor and function signAuthToken.
2024-07-11 14:59:15 +02:00
6905e8faee
feat(credentials): refactor hashing, verification, and token signing methods
This commit reimplements the hashing, verification, and token signing methods in the CredentialsService. It also adjusts the constructor's parameters, reorders imports, and introduces additional logging for debugging purposes. Finally, it corrects minor formatting and style issues in the credentials.service.ts and credentials.module.ts files.
2024-07-11 13:51:13 +02:00
3ac89964ab
feat(credentials): add jwt token verification and signing
In the credentials.service.ts file, jose is imported for jwt token operations. Two new methods are added. One method for jwt token verification and another for token signing. Token metadata such as IssuedAt, ExpirationTime, Issuer, Audience, and Subject are configured.
2024-07-09 16:03:20 +02:00
cac7d4cfd3
feat(credentials): add new Credentials service and module
Introduce the Credentials service which is responsible for hashing and verifying passwords. Added appropriate methods within the service and provided it in a new Credentials module. The module exports the service to allow its use in other parts of the application.
2024-07-09 15:06:37 +02:00