Skip to content
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

Fix the issue of password expiry event trigger of PasswordGrantHandler #2659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sandushi
Copy link
Contributor

@sandushi sandushi commented Jan 3, 2025

Purpose

$subject

Changes from this PR

  • When the password is expired for the user, the password grant handler should return below.
{
  "error_description": "Authentication Failed! Password has expired",
  "error": "invalid_grant"
}
  • But before trigger the triggerPasswordExpiryValidationEvent , the authentictaed user is return in the current implementation. Due to this even though the password is expired, the token is issued for the user.
  • To fix this issue, the triggerPasswordExpiryValidationEvent should be triggered before return the authenticated user.

Related issue

This issue is identified and fixed with wso2/product-is#21890 effort.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.43%. Comparing base (9095d8d) to head (a8e87fe).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
...th2/token/handlers/grant/PasswordGrantHandler.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2659      +/-   ##
============================================
+ Coverage     56.40%   56.43%   +0.02%     
+ Complexity     8269     8259      -10     
============================================
  Files           632      632              
  Lines         46680    46680              
  Branches       8508     8508              
============================================
+ Hits          26332    26345      +13     
+ Misses        16585    16573      -12     
+ Partials       3763     3762       -1     
Flag Coverage Δ
unit 38.75% <60.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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