Feature/handel multiple attempt password#426
Conversation
Mapped ASHA's list is missing in Login API response
setDemographicDetails() was overwriting occupationName (already set correctly by the mapper from occupationID) with null when no occupation name string was present in the payload. Added null guards so the mapper's resolved name is preserved, and explicitly set occupationId/educationId from i_bendemographics to ensure the IDs always reach Identity-API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…x server" This reverts commit eb917b2.
Occupation details getting null in DB
logOutUserFromConcurrentSession only cleaned up old-style Redis session keys but never added the displaced user's JWT to the denylist. Because JwtUserIdValidationFilter validates solely via JWT signature and the denylist, System 1's token remained valid and all APIs returned 200 after System 2 forced a concurrent login. Fix: store a username→JTI mapping in Redis at login time; during concurrent-session logout, look up the JTI and add it to the denylist and evict the user_<id> cache so the next request from System 1 is rejected with 401 and the frontend shows the session-expiry message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: concurrent session logout not invalidating JWT in first system
logOutUserFromConcurrentSession only cleaned up old-style Redis session keys but never added the displaced user's JWT to the denylist. Because JwtUserIdValidationFilter validates solely via JWT signature and the denylist, System 1's token remained valid and all APIs returned 200 after System 2 forced a concurrent login. The root serialization bug: redisTemplate value serializer is Jackson2JsonRedisSerializer<User>, so storing a plain String JTI caused a deserialization failure on retrieval. Fixed by using the existing StringRedisTemplate bean for the jti: key operations. Fix: - Store username->JTI mapping via StringRedisTemplate at login (both userAuthenticate and superUserAuthenticate) - On concurrent-session logout, retrieve the JTI, add it to the denylist, evict user_<id> from User cache, and clean up jti: key - Add getAccessTokenExpiration() to JwtUtil to supply the TTL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: concurrent session logout not invalidating JWT on first system
Add generateSecureToken/generateSecureRefreshToken methods that use userId as sub instead of username. Mobile logins (okhttp User-Agent) use the secure token — web logins remain unchanged for backward compatibility. Other services will be migrated one by one. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



📋 Description
JIRA ID:
Feature handle multiple attempt password
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.