Skip to content

Implement AuthenticationFlow in gateway-svc, Add Debug statements#18

Merged
sfdamm merged 5 commits intodevfrom
feat/gateway-auth-controller
Jul 15, 2025
Merged

Implement AuthenticationFlow in gateway-svc, Add Debug statements#18
sfdamm merged 5 commits intodevfrom
feat/gateway-auth-controller

Conversation

@sfdamm
Copy link
Collaborator

@sfdamm sfdamm commented Jul 14, 2025

✅ Summary

This PR introduces the complete authentication flow in the gateway-svc module. It includes the following key features:

🔐 Features Implemented

  • CORS Configuration: Enabled CORS to allow cross-origin requests.
  • JWT Logic: Added support for generating and validating JWT tokens.
  • Authentication Endpoints:
    • /auth/login
    • /auth/register
    • /auth/refresh
    • /auth/logout
  • Test Coverage: Unit and integration tests added for all auth-related endpoints and logic.

🛠 Debugging Support

  • Added debug log statements throughout the flow for easier tracing and diagnostics during development.

📌 Notes

  • Ensure environment variables for JWT secrets and CORS origins are correctly set.
  • Possible future improvements:
    • Rate-limiting
    • OAuth2 integration
    • Persistent session handling

@sfdamm sfdamm self-assigned this Jul 14, 2025
@sfdamm sfdamm added the enhancement New feature or request label Jul 14, 2025
- Updated app configuration to use `withInterceptorsFromDi()` for HTTP client.
- Moved HTTP interceptor providers outside of conditional logic for clarity.
- Added CORS configuration in `CorsConfig.java` to allow specific origins and methods.
- Implemented `CorsPreFlightFilter` to handle preflight requests and set appropriate CORS headers.
- Updated `SecurityConfig.java` to permit OPTIONS requests for preflight handling.
Copy link
Collaborator

@lenni108 lenni108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@sfdamm sfdamm merged commit 7516c29 into dev Jul 15, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants