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:
- Upgrade dependency to at least .NET core 3.1 (although I would suggest immediately going to .NET 6, which is the current LTS release), and use IdentityModel.AspNetCore to easily implement Oauth2 client credentials grant flow
- Remove custom initialization of
HttpClient insize ReportingService class, and obtain a HttpClient instance through DI. This would allow us to pre-configure a HttpClient for the ReportingService class, which would in turn allow is to add a token management handler using IdentityModel.AspNetCore in our external code.
I prefer the first option, if you agree I can work on a PR for this.
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:
HttpClientinsizeReportingServiceclass, and obtain a HttpClient instance through DI. This would allow us to pre-configure aHttpClientfor theReportingServiceclass, which would in turn allow is to add a token management handler using IdentityModel.AspNetCore in our external code.I prefer the first option, if you agree I can work on a PR for this.