Skip to content

OTWO-7725:enforce JWT expiration validation and update refresh token … - #1934

Open
kaushak-ai wants to merge 4 commits into
mainfrom
OTWO-7725
Open

OTWO-7725:enforce JWT expiration validation and update refresh token …#1934
kaushak-ai wants to merge 4 commits into
mainfrom
OTWO-7725

Conversation

@kaushak-ai

Copy link
Copy Markdown

…expiry from 48h to 1h

@kaushak-ai
kaushak-ai requested review from Niharika1117 and Priya5 and a lite review from Copilot August 7, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 exp claim, enable expiration validation during decode, and return a 401 for expired tokens.
  • Add DELETE /api/v1/jwt logout 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.

Comment thread config/routes.rb Outdated
Comment thread test/controllers/api_v1_jwt_controller_test.rb Outdated
Comment thread app/lib/fisbot/fisbot_api.rb Outdated
Comment thread app/helpers/jwt_helper.rb
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