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

Honour local claim dialect. #38

Merged

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Feb 9, 2025

Issue:

This PR fixes an issue where email resolution for sending an email OTP does not honor the local claim dialect.

If the authenticator's claim dialect is not the OIDC dialect, it directly checks for claim mapping. However, IdPs using the local claim dialect do not have claim mappings, causing the issue.

This fix ensures that if idp.isLocalClaimDialect() returns true, the email is retrieved using the WSO2 email claim.

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/13229016526

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

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

Project coverage is 30.87%. Comparing base (995d970) to head (f7c98f8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ity/local/auth/emailotp/EmailOTPAuthenticator.java 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #38      +/-   ##
============================================
+ Coverage     27.12%   30.87%   +3.74%     
- Complexity      135      149      +14     
============================================
  Files             8        8              
  Lines          2997     2999       +2     
  Branches        855      858       +3     
============================================
+ Hits            813      926     +113     
+ Misses         2019     1901     -118     
- Partials        165      172       +7     
Flag Coverage Δ
unit 32.28% <0.00%> (?)

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.

@Thisara-Welmilla Thisara-Welmilla force-pushed the honour-local-dialect branch 2 times, most recently from 7f21b40 to d635234 Compare February 9, 2025 20:26
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13229016526
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13229016526

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/13232470295

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/13232485179

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13232485179
Status: cancelled

@Thisara-Welmilla Thisara-Welmilla merged commit 1c840a0 into wso2-extensions:main Feb 10, 2025
3 of 4 checks passed
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13232470295
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13232470295

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.

3 participants