Skip to content

Conversation

@jmprieur
Copy link
Contributor

@jmprieur jmprieur commented May 21, 2025

Exposes publicly override of AadIssuerValidator factory taking a delegate

Fixes #3245

@jmprieur jmprieur requested a review from a team as a code owner May 21, 2025 22:12
@jmprieur jmprieur requested a review from Copilot May 21, 2025 22:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR exposes the AadIssuerValidator factory method publicly to enable caching functionality for AadIssuerValidator instances. Key changes include:

  • Changing the access modifier of GetAadIssuerValidator from internal to public.
  • Adding tests to validate that the factory method handles null/empty authorities and enforces caching when a null provider is used.
  • Updating the public API specification to include the new public factory method.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/Microsoft.IdentityModel.Validators.Tests/AadIssuerValidatorTests.cs Added tests to validate input arguments and caching behavior of the AadIssuerValidator factory method.
src/Microsoft.IdentityModel.Validators/PublicAPI.Unshipped.txt Updated to expose the new public factory method in the public API surface.
src/Microsoft.IdentityModel.Validators/AadIssuerValidator/AadIssuerValidator.cs Changed the GetAadIssuerValidator method from internal to public.

@github-actions
Copy link

Summary

Summary
Generated on: 5/21/2025 - 10:27:34 PM
Coverage date: 5/21/2025 - 10:16:38 PM - 5/21/2025 - 10:26:53 PM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

@jmprieur jmprieur changed the title Exposes puublicly the factory for AadIssuerValidator with cache function Exposes publicly the factory for AadIssuerValidator with cache function May 22, 2025
@jmprieur jmprieur self-assigned this May 22, 2025
@jmprieur jmprieur changed the title Exposes publicly the factory for AadIssuerValidator with cache function Exposes publicly override of AadIssuerValidator factory taking a delegate May 22, 2025
@github-actions
Copy link

Summary

Summary
Generated on: 5/22/2025 - 12:56:27 AM
Coverage date: 5/22/2025 - 12:46:00 AM - 5/22/2025 - 12:55:49 AM
Parser: MultiReport (60x Cobertura)
Assemblies: 1
Classes: 7
Files: 2
Line coverage: 80.3% (620 of 772)
Covered lines: 620
Uncovered lines: 152
Coverable lines: 772
Total lines: 483
Branch coverage: 67.8% (228 of 336)
Covered branches: 228
Total branches: 336
Method coverage: Feature is only available for sponsors

Coverage

Microsoft.IdentityModel.JsonWebTokens - 80.3%
Name Line Branch
Microsoft.IdentityModel.JsonWebTokens 80.3% 67.8%
Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities 100%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated 80.3% 67.8%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F12A1AEDDDFE32BA
DF4DBFF323AF1BCB48B9F9721B7CD3E05F5E034CF225E3DF8__CreateJwsRegex_0
81.4% 67.6%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJweRegex_1
79.2% 68%
System.Text.RegularExpressions.Generated.<RegexGenerator_g>F334844C618E00D3
CEC5D3FE0D00CF0141BBEE98635313BB2CB8D3921464CE05A__CreateJwsRegex_0
81.4% 67.6%

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.

[Feature Request] Exposes publicly override of AadIssuerValidator factory taking a delegate

3 participants