Add OpenAPI support and enhance JWT error handling#7
Merged
jeyongsong merged 4 commits intomainfrom Feb 5, 2026
Merged
Conversation
Test Results8 tests 8 ✅ 0s ⏱️ Results for commit 72932d5. ♻️ This comment has been updated with latest results. |
subsub97
commented
Feb 4, 2026
| request.setAttribute(AuthConstants.CURRENT_MEMBER_ID, memberId) | ||
| filterChain.doFilter(request, response) | ||
| } catch (ex: ExpiredJwtException) { | ||
| writeErrorResponse(response, ErrorCode.EXPIRED_TOKEN) |
Collaborator
Author
There was a problem hiding this comment.
이것저것 추가하려다가 당장 필요할 거 같은 것만 추가해뒀어
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to authentication error handling, updates environment variable usage for deployment, and adds Swagger API documentation configuration. The main changes enhance JWT token validation, provide more specific error responses, and improve developer experience with API docs.
Authentication & Error Handling Improvements:
JwtAuthenticationFilterto handle expired JWT tokens explicitly, returning anEXPIRED_TOKENerror code and message when a token is expired, and using a generic unauthorized error for other failures. The filter now catchesExpiredJwtExceptionand distinguishes between missing, invalid, and expired tokens.EXPIRED_TOKENto theErrorCodeenum, replacing the previousOIDC_PROVIDER_ERROR. This allows for clearer error messaging when tokens expire.JwtAuthenticationFilterto allow unauthenticated access to Swagger and API documentation endpoints, improving developer access to docs.API Documentation:
SwaggerConfigclass to configure OpenAPI/Swagger documentation, including JWT bearer authentication setup and ignoring theAuthenticatedMemberannotation for documentation generation.Deployment Configuration:
SPRING_PROFILES_ACTIVEenvironment variable instead ofPROFILEfor specifying the active Spring profile, aligning with Spring Boot conventions. (.github/workflows/prod-deploy.yml)Submodule Update:
moa-secretsubmodule to a new commit, potentially updating secrets or configuration for the project.