OTWO-7725:enforce JWT expiration validation and update refresh token … - #1934
Open
kaushak-ai wants to merge 4 commits into
Open
OTWO-7725:enforce JWT expiration validation and update refresh token …#1934kaushak-ai wants to merge 4 commits into
kaushak-ai wants to merge 4 commits into
Conversation
…expiry from 48h to 1h
kaushak-ai
requested review from
Niharika1117 and
Priya5
and
a lite review from Copilot
August 7, 2026 07:50
There was a problem hiding this comment.
Pull request overview
Updates API JWT handling to enforce expiration and introduces a logout endpoint, along with supporting route, test, and autoload adjustments.
Changes:
- Switch JWTs to the standard
expclaim, enable expiration validation during decode, and return a 401 for expired tokens. - Add
DELETE /api/v1/jwtlogout endpoint and related controller tests. - Adjust loading/infra behavior (eager-load
app/lib; make Fisbot validation resilient to API errors).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/controllers/api_v1_projects_controller_test.rb | Adds a controller test asserting expired JWTs are rejected. |
| test/controllers/api_v1_jwt_controller_test.rb | Adds logout tests; introduces test setup/teardown changes for cache handling. |
| config/routes.rb | Adds a DELETE route for JWT logout. |
| config/application.rb | Adds app/lib to eager load paths. |
| app/lib/fisbot/fisbot_api.rb | Changes Fisbot validation behavior when the upstream API errors. |
| app/helpers/jwt_helper.rb | Implements exp-based JWT creation and decode-time expiration enforcement. |
| app/controllers/api/v1/jwt_controller.rb | Adds destroy action and restricts param validation to create. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…expiry from 48h to 1h
…expiry from 48h to 1h
…expiry from 48h to 1h
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.
…expiry from 48h to 1h