Repository navigation
feat: Support custom HttpClient for signature validation - #3272
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to use a custom 'IHttpClientFactory' when fetching certificates for signature verification in 'GoogleJsonWebSignature' and 'SignedTokenVerification'. It adds the 'HttpClientFactory' property to 'ValidationSettings' and 'SignedTokenVerificationOptions', updates 'CertificateCache' to utilize this factory if provided, and includes comprehensive unit tests to verify the new functionality. There are no review comments, so I have no feedback to provide.
96eec02 to
ebc963a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to use a custom IHttpClientFactory when fetching certificates for signature verification in GoogleJsonWebSignature and SignedTokenVerification. It adds an HttpClientFactory property to ValidationSettings and SignedTokenVerificationOptions, and updates CertificateCache to utilize this factory when creating HTTP clients. Additionally, it updates the signature of GetCertificatesAsync and FetchCertificatesAsync to accept SignedTokenVerificationOptions instead of a boolean flag, and adds comprehensive unit tests to verify the new functionality. There are no review comments, so I have no feedback to provide.
| Assert.Same(firstCall, secondCall); | ||
| Assert.Equal(1, factory.Calls); | ||
|
|
||
| // Force refresh: should call factory again |
Closes #3271