-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add interface for IdentityServerTools #1454
Conversation
@AndersAbel check in our docs for updates based on this: https://docs.duendesoftware.com/identityserver/v6/tokens/internal/ |
Thanks for this @matt-goldman -- we'll work on it! |
- Mark as obsolote to discourage direct use
Am I right to think that this is a breaking change only in the sense that the class is marked obsolete? |
If someone has customized the service/class and replaced it with their own in DI this will revert back to using the default version of the service. I added Obsolete because I think that helps flagging this for anyone that has usage/customization. |
What issue does this PR address?
IdentityServerTools
is useful and I expect used in a lot of places. However as it's a concrete class it is difficult to test services that depend on it. This PR creates an abstractionIIdentityServerTools
which can be injected instead, and can therefore be mocked easily for tests. This is important for testing services that depend uponIdentityServerTools
but don't explicitly need it for testing purposes.Note: This would be a breaking change. Personally I think that's ok, but if you wanted to maintain backward compatibility, we could keep both registrations:
Important: Any code or remarks in your Pull Request are under the following terms:
If You provide us with any comments, bug reports, feedback, enhancements, or modifications proposed or suggested by You for the Software, such Feedback is provided on a non-confidential basis (notwithstanding any notice to the contrary You may include in any accompanying communication), and Licensor shall have the right to use such Feedback at its discretion, including, but not limited to the incorporation of such suggested changes into the Software. You hereby grant Licensor a perpetual, irrevocable, transferable, sublicensable, nonexclusive license under all rights necessary to incorporate and use your Feedback for any purpose, including to make and sell any products and services.
(see our license, section 7)