-
Notifications
You must be signed in to change notification settings - Fork 141
migrated jwtAuth error response to problem JSON, added 'nbf' claim in jwtSign #1806
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe changes update JWT error handling and token signing across multiple components. The Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant JwtAuthInterceptor
participant JWTException
participant ProblemDetails
Client->>JwtAuthInterceptor: Send request with JWT
JwtAuthInterceptor->>JwtAuthInterceptor: Validate JWT header & parse token
alt Missing or Invalid JWT
JwtAuthInterceptor->>JWTException: Throw JWTException(message, id)
JWTException-->>JwtAuthInterceptor: Exception raised
JwtAuthInterceptor->>ProblemDetails: Build error response with error ID and detail
ProblemDetails-->>Client: Return Problem JSON response
else Valid JWT
JwtAuthInterceptor->>Client: Process request normally
end
sequenceDiagram
participant JwtSignInterceptor
participant PayloadGenerator
JwtSignInterceptor->>PayloadGenerator: Prepare JWT payload using expirySeconds and clockSkewSeconds
PayloadGenerator-->>JwtSignInterceptor: Return payload with nbf claim
JwtSignInterceptor->>JwtSignInterceptor: Sign and generate JWT token
JwtSignInterceptor-->>Client: Return signed JWT
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
🧰 Additional context used🧬 Code Graph Analysis (2)core/src/test/java/com/predic8/membrane/core/interceptor/jwt/JwtAuthInterceptorUnitTests.java (1)
core/src/main/java/com/predic8/membrane/core/interceptor/jwt/JwtAuthInterceptor.java (1)
🔇 Additional comments (25)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request needs "/ok-to-test" from an authorized committer. |
Summary by CodeRabbit
New Features
Refactor
Tests
Documentation