How are you extending Duende.AccessTokenManagement? #140
Replies: 4 comments 9 replies
-
We're extending it today in order to encrypt the token before caching, and then decrypting after reading. For our purposes (and maybe others), it would be useful to expose the value serialization/deserialization as well as choice of key. Maybe someone wants to encrypt the value, or use protobuf rather than json. |
Beta Was this translation helpful? Give feedback.
-
Related: https://github.com/orgs/DuendeSoftware/discussions/143 |
Beta Was this translation helpful? Give feedback.
-
We are extending Duende.AccessTokenManagement in a few ways. I've just tried to upgrade our implementation to 4.0.0-RC1.5. It was straight forward for client credentials, we add mandatory custom token parameters. We added an in memory cache option, although with named key support we could remove this. One thing we are also doing is extending Duende.AccessTokenManagement for token exchange, using We also extend the So really with this new model we will struggle to extend it and will have to write more of our own code, or forego Duende.AccessTokenManagement entirely unless we get access to some more public classes to extend. |
Beta Was this translation helpful? Give feedback.
-
As a follow up, we just released Duende.AccessTokenManagement 4 preview 2. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As we work on adding new features to AccessTokenManagement, we've encountered some challenges with its current design, particularly regarding extensibility. The existing approach leans towards inheritance rather than composition, which comes with certain drawbacks. For instance, adding a constructor parameter can immediately introduce a breaking change.
For example, one area where this poses a problem is our caching strategy. To customize the cache key, you currently have to inherit from the cache and override the GenerateCacheKey method. In the next version of Duende.AccessTokenManagement (V4), this inheritance-based approach will be deprecated in favor of injecting a cache key generator.
Looking ahead, our plan is to:
This maximizes the flexibility of the library while minimizing the chances for introducing breaking changes.
To make these improvements as effective as possible, we’d love to hear from you—how are you using and extending Duende.AccessTokenManagement? Your feedback will help shape the future of the library.
Beta Was this translation helpful? Give feedback.
All reactions