Repository navigation
feat(WebAuthenticationProvider): Allow providing IWebAuthenticationBrokerProvider via DI parameters - #2890
feat(WebAuthenticationProvider): Allow providing IWebAuthenticationBrokerProvider via DI parameters#2890DevTKSS wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the WebAuthenticationProvider to support dependency injection of custom IWebAuthenticationBrokerProvider implementations. This allows developers to provide their own authentication broker implementations instead of being limited to the default WebAuthenticationBroker.
- Adds optional IWebAuthenticationBrokerProvider parameter to constructor via dependency injection
- Implements conditional logic to use custom broker when provided, falling back to default behavior
- Adds documentation comment about OAuth Authorization Code Flow with PKCE challenge support
|
removed Todo for callback would be able to work with if this PR and the would get merged, so we could provide the WebAuthBrokerProvider Implementation and the @kazo0 would you see the option that this could get reviewed? then I could just put an Implementation in the DI container on non Windows targets like Desktop and could go on with my Projects. e.g. my approach would be HttpListener with OpenBrowser like we seen on but without the tcpListener using approach because my API I need does require other then what this Server setup can do because its not allowing to tell that I would like to have localhost and not |
|
looking up the could eventually be caused by the Assembly lookup of that attribute but not the solution or usings? e.g. if we consider the extension of the Provider is defined in a seperate project the Assembly might not be equal to the one where its meant to be used, but I think that should be optional, so maybe this needs to add a nullable and default to null IWebAuthenticationBrokerProvider in the ctor of the definition of the uno.ui implementation of it too ? |
|
Hey @kazo0 , For example, if this here would be possible and our Service would "just" be required to meet the interface expectations, so the Uno provider here could do its task as-is, this would simplify soo much 😅 and by using the Given case, we would allow this, the Consumer of this enhancement would simply need to:
How does that sound to you? 😃 |
…okerProvider via DI parameters Optional so existing Code will not break Conditional "if" added for Windows, where compiler gives CS0246 otherwhise. see issue 21237 on the unoplatform/uno repo for more information about this
88b95ca to
f2c69fa
Compare
GitHub Issue (If applicable): closes #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
If we would register an Implementation (e.g. via ApiExtension) of this Interface, the DI constructor would resolve IWebAuthenticationBroker as not null
Optional Argument so existing Code will not break, while Users of Web Auth could provide ApiExtensions of this to be used.
Applyed Conditional
#if !WINDOWSbecause of otherwhise this Interface gets linted with CS0246. see issue on the unoplatform/uno repo for more information about this:Should enable also to use any future Implementations of this Interface to be used like I am trying to acomplish right now just with HttpListener or maybe Refit for enabling https instead of just http (tpc Listener seems to not be able to use https?):
added a comment where the oAuth code challenge function should be made availeble as minimalistic approach/or hopefully solution (?) for adding custom action for this without having to copy and re-write the whole WebAuthentication classes and so on, which uno has already!
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
if this callback could be added, this could be a usable workaround until a full oauth feature would be added for:
Internal Issue (If applicable):