Comments (4)
Hi @goldsam, could you please provide some more information? This library is built using Flurl which provides a wrapper for HttpClient, and manages the HttpClient lifecycle, etc.
It would be a significant design change to move this project from Flurl to a standard HttpClient, so this issue is likely out of scope, unless Flurl has support to configure it with an existing HttpClient.
from keycloak.net.
I understand. Why does HttpClient
need to be wrapped? this is the platform standard client. Preventing me from injecting my own instance flies in the face of well established conventions - specifically constructor injection.
I see Flurl has an IFlurlClientFactory
abstraction. Allowing an instance of this interface to be injected into the client constructor would satisfy my requirements.
from keycloak.net.
Hi @goldsam,
I see that you opened an issue on the Flurl project yesterday asking for some more information about the goals of Flurl. I see it has since been deleted, so hopefully you got a satisfactory answer.
As for why it is used in this project, as you can likely see this project was forked from an earlier project, and we took over maintenance of the fork in mid-2023, so I cannot really speak to why it was originally chosen, as Flurl has been a dependency for this project long before we started maintaining it.
With that said, as with many open-source projects we welcome contributions from the community, so, if you would like to be able to inject an existing HttpClient instance via the Factory interface you identified you are welcome to open a Pull Request. Please keep in mind when implementing this change should be backwards compatible with the existing implementation, i.e. it should be optional to inject an HttpClient and your change should not require users to manage their own HttpClient if they do not want to.
If you do open a PR please let me know so that it doesn't get missed,
Thanks.
from keycloak.net.
I've found that it was easier to just NSwag to code generate a client from a generated Keycloak OpenAPI spec. This approach is easier to keep up to date and is considerably more flexible. Thanks though.
from keycloak.net.
Related Issues (17)
- jsonproperties in Keycloak.Net.Models.ProtocolMappers.ProtocolMapper HOT 1
- RealmsAdmin.AdminEvent.Time int? causes json deserialisation error HOT 8
- Is it possible to cache admin access token ? HOT 2
- Flurl 3.* compatibility HOT 1
- Add interfaces to facilitate unit testing
- Variabilize grant_type value HOT 1
- Create client-scope dont set "display on consent screen"
- Unable to create client scope HOT 1
- Consider eliminating dependency on Flurl HOT 1
- Handling of Id and ClientId in Keycloak.Net.Core/Clients/KeycloakClient.cs HOT 2
- Inefficient token management HOT 3
- [Advice] Targetting .NET 4.7 HOT 3
- KeycloakClient.GetUserForServiceAccountAsync should not be Obsolete HOT 1
- Cannot get serverinfo for Keycloak 24.0.4 HOT 2
- .Net Document doens't exists HOT 1
- [Question] Most efficient way of fetching users with roles? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak.net.