Skip to content

Implement JWT logout endpoint with token revocation and update unit tests - #35

Merged
RuslanLomaka merged 1 commit into
masterfrom
Registration/Authentication
Sep 17, 2025
Merged

Implement JWT logout endpoint with token revocation and update unit tests#35
RuslanLomaka merged 1 commit into
masterfrom
Registration/Authentication

Conversation

@MarkCh20

Copy link
Copy Markdown
Collaborator

…estsThis PR implements secure logout functionality with full token revocation support.

Key changes:

  1. Added AuthController.logout() endpoint.
  2. Updated AuthServiceImpl to store revoked tokens in the database.
  3. Introduced RevokedToken entity and repository, with Flyway migration.
  4. Unit tests updated for:
    • Revoked tokens
    • Malformed and invalid tokens
    • Refresh token strict stubbing
  5. Logout flow verified in Postman: revoked tokens cannot be reused.

This ensures improved session management and security by invalidating JWT tokens upon logout.

@RuslanLomaka
RuslanLomaka merged commit 13f06ce into master Sep 17, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants