-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Authentication with JWT and Refresh Token Mechanism #264 #288
Enhance Authentication with JWT and Refresh Token Mechanism #264 #288
Conversation
…esh-Token-Mechanism
…ized by qualitygate
…ized by qualitygate
Overall, this is excellent work! The code is well-structured and the functionality is clearly implemented. Great job on adding a robust JWT-based authentication mechanism. Before merging, there are a few suggestions and potential adjustments to consider that could further enhance the maintainability, security, and readability of the code. Then the code should be ready to merge! |
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/JWTManager.java
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/JWTManager.java
Outdated
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/AuthenticationResource.java
Show resolved
Hide resolved
.../src/main/java/de/remsfal/service/boundary/authentication/HeaderExtensionResponseFilter.java
Outdated
Show resolved
Hide resolved
.../src/main/java/de/remsfal/service/boundary/authentication/HeaderExtensionResponseFilter.java
Outdated
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/KeyLoader.java
Outdated
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/KeyLoader.java
Outdated
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/KeyLoader.java
Outdated
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/SessionManager.java
Show resolved
Hide resolved
remsfal-service/src/main/java/de/remsfal/service/boundary/authentication/SessionManager.java
Show resolved
Hide resolved
…ized by qualitygate
…ized by qualitygate
…JWT-and-Refresh-Token-Mechanism' into 264/Enhance-Authentication-with-JWT-and-Refresh-Token-Mechanism # Conflicts: # remsfal-service/src/main/resources/META-INF/liquibase-changelog-0_1_2.xml # remsfal-service/src/main/resources/application.properties # remsfal-service/src/test/java/de/remsfal/service/boundary/authentication/HeaderExtensionResponseFilterTest.java # remsfal-service/src/test/java/de/remsfal/service/boundary/project/BuildingResourceTest.java # remsfal-service/src/test/java/de/remsfal/service/boundary/project/ChatResourceTest.java
…esh-Token-Mechanism
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All suggested revisions have been addressed or justified, thank you for that! Now, only the final checks need to pass!
|
closes #264
Description
This PR introduces a secure authentication mechanism using JWTs for access tokens and refresh tokens, replacing the current session-based authentication. It enhances security, enables frontend access to user data, and ensures token lifecycle management.
Motivation
The current authentication system has the following limitations:
To address these issues, JWTs for access tokens and refresh tokens are introduced.
Changes Implemented
1. JWT-Based Access Tokens
2. Refresh Tokens
3. Token Renewal Workflow
*Issues a new access token.
*Invalidates the old refresh token and generates a new one.