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

Validate IssuerSigningKey: Refactor to use ValidationParameters over TVP #2764

Merged
merged 7 commits into from
Aug 6, 2024

Conversation

iNinja
Copy link
Contributor

@iNinja iNinja commented Aug 6, 2024

Validate IssuerSigningKey: Refactor to use ValidationParameters over TVP

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • If any gains or losses in performance are possible, you've included benchmarks for your changes. More info
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Replaced use of TokenValidationParameters with ValidationParameters inside ValidateIssuerSecurityKey and updated tests accordingly.
Removed version of the method that takes BaseConfiguration as it is not used, and the exposed delegate does not contain it either.

Part of #2711

@iNinja iNinja requested a review from a team as a code owner August 6, 2024 12:17
@iNinja iNinja changed the title Validate IssuerSecurityKey: Refactor to use ValidationParameters over TVP Validate IssuerSigningKey: Refactor to use ValidationParameters over TVP Aug 6, 2024
Copy link
Contributor

@FuPingFranco FuPingFranco left a comment

Choose a reason for hiding this comment

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

Just left a question, other than that LGTM

public IssuerSigningKeyValidatorDelegate IssuerSigningKeyValidator
{
get => _issuerSigningKeyValidator;
set => _issuerSigningKeyValidator = value ?? throw new ArgumentNullException(nameof(value), "IssuerSigningKeyValidator cannot be set as null.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider creating a log message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have a number of similar scenarios. I will definitely look into generalising them and reusing a log message or creating a new one as part of this stream.

…rSigningKey.cs

Co-authored-by: sruthikeerthi <73967733+sruke@users.noreply.github.com>
@iNinja iNinja merged commit 0b066f1 into dev Aug 6, 2024
6 checks passed
@iNinja iNinja deleted the iinglese/validate-issuer-security-key branch November 15, 2024 12:15
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.

5 participants