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: Resolve erroneous exception throw on tenant domain validation #755

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

ramonschriks
Copy link
Contributor

Follow up of #753


What a failure.. After validating the issuer with the tenant domain, we still throw'd the exception...
It must not fall through this validation succeeds.

Perhaps a unit test is required for this.

Fix in not falling through exception after fallback validator succeeded...

Signed-off-by: ramonschriks <ramon.nmgn@live.nl>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2dd8a74) 99.97% compared to head (133feb1) 99.97%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #755   +/-   ##
=========================================
  Coverage     99.97%   99.97%           
  Complexity     1383     1383           
=========================================
  Files            62       62           
  Lines          4781     4781           
=========================================
  Hits           4780     4780           
  Misses            1        1           
Flag Coverage Δ
unittestsvalidate 99.97% <100.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.

@evansims evansims merged commit 347bea6 into auth0:main Jan 9, 2024
23 checks passed
evansims pushed a commit that referenced this pull request Jan 11, 2024
### Changes

Added test coverage for previous added issuer claim validation with
custom domain.
- Added expecting failure scenario with invalid `domain` not matching
token issuer
- Added expecting failure scenario with invalid `domain` AND invalid
`custom domain` not matching token issuer
- Added scenario with custom domain matching token issuer, should
validate.
- Added scenario with custom domain not matching token issuer, should
validate with tenant domain

### References

Ref: #755

### Contributor Checklist

- [x] I agree to adhere to the [Auth0 General Contribution
Guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md).
- [x] I agree to uphold the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).

---------

Signed-off-by: ramonschriks <ramon.nmgn@live.nl>
Co-authored-by: Ramon <ramon@xel.nl>
@evansims evansims changed the title Update Token.php fix: Resolve erroneous exception throw on tenant domain validation Jan 11, 2024
@evansims evansims mentioned this pull request Jan 11, 2024
evansims added a commit that referenced this pull request Jan 11, 2024
**Fixed**
- fix: Resolve erroneous exception throw on tenant domain validation
[\#755](#755)
([ramonschriks](https://github.com/ramonschriks))
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.

None yet

3 participants