Skip to content

Introduce IDPoPProofTokenFactory#267

Merged
josephdecock merged 2 commits intomainfrom
beh/dpop-non-exportable-key-support
Oct 6, 2025
Merged

Introduce IDPoPProofTokenFactory#267
josephdecock merged 2 commits intomainfrom
beh/dpop-non-exportable-key-support

Conversation

@bhazen
Copy link
Contributor

@bhazen bhazen commented Sep 26, 2025

What issue does this PR address?
Added IDPoPProofTokenFactory to allow for customizations to how proof tokens are generated. This came from a community request for more flexibility.

As part of these changes, DPoPProofTokenFactory was renamed to DefaultDPoPProofTokenFactory to make it clear it is the default behavior.

New extensions methods were added for when a user wishes to supply their own implementation of IDPoPProofTokenFactory. Otherwise the existing extension methods will continue to work for existing code

@bhazen bhazen added this to the imoc-7.0.0 milestone Sep 26, 2025
@bhazen bhazen self-assigned this Sep 26, 2025
@bhazen bhazen requested review from a team and Copilot September 26, 2025 17:15
@bhazen bhazen added area/foss/im-oidc-client Issues related to Identity Model OIDC Client impact/breaking The fix or change will be a breaking one labels Sep 26, 2025
@bhazen bhazen force-pushed the beh/dpop-non-exportable-key-support branch from 147c179 to c988e64 Compare September 26, 2025 17:15
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 introduces a new interface IDPoPProofTokenFactory to provide flexibility for customizing DPoP proof token generation, addressing a community request. The existing DPoPProofTokenFactory is renamed to DefaultDPoPProofTokenFactory to clarify its role as the default implementation.

  • Introduces IDPoPProofTokenFactory interface for proof token customization
  • Renames DPoPProofTokenFactory to DefaultDPoPProofTokenFactory
  • Adds new extension methods accepting IDPoPProofTokenFactory while maintaining backward compatibility

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IDPoPProofTokenFactory.cs New interface defining contract for proof token factories
DefaultDPoPProofTokenFactory.cs Renamed class implementing the new interface with default behavior
ProofTokenMessageHandler.cs Updated constructor to accept interface instead of concrete type
OidcClientExtensions.cs Added overloads accepting interface while preserving existing string-based methods
DPoPTests.cs Updated test to use new factory pattern

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

bhazen added 2 commits October 1, 2025 11:32
# Conflicts:
#	identity-model-oidc-client/src/IdentityModel.OidcClient.Extensions/DPoP/OidcClientExtensions.cs
@bhazen bhazen force-pushed the beh/dpop-non-exportable-key-support branch from b15e0f3 to 88995b9 Compare October 1, 2025 16:32
@josephdecock josephdecock merged commit bdcca2f into main Oct 6, 2025
11 checks passed
@josephdecock josephdecock deleted the beh/dpop-non-exportable-key-support branch October 6, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/foss/im-oidc-client Issues related to Identity Model OIDC Client impact/breaking The fix or change will be a breaking one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants