jsreport / jsreport-dotnet-client

jsreport remote client for c#
MIT License
3 stars 4 forks source link

No support for OAuth2 authentication #6

Open AlexGoris-KasparSolutions opened 2 years ago

AlexGoris-KasparSolutions commented 2 years ago

I noticed this library supports only basic username/password authentication. Although JSReport supports OAuth2 authentication (link), this SDK/client does not allow to interface with a JSReport instance which is configured that way.

I tought I could quickly make a PR for this, but the current dependency on .NET Standard 2.0 and .NET Framework 4.5 prohibit me from using IdentityModel.AspNetCore, which greatly simplifies implementing OAuth2 client credentials grant flow using HttpClient.

I see 2 options:

I prefer the first option, if you agree I can work on a PR for this.

pofider commented 2 years ago

Hi, thank you for your activity. I'm definitely interested.

I'm not sure if I want to already limit the reach and remove the .netstadnard 2.0 and net 45 targets. There are likely still apps that use this client and don't want to update.

However please prototype the solution with IdentityModel.AspNetCore and .net 6 and we will then decide how we can release it.

We can decide to really stop supporting the older targets, ship your part in extra package, or we can multitarget this package with compile conditions

#if NET5_0
   new IdentityModel.AspNetCore.AccessTokenRequestSynchronization()
#endif