Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

What package can be used to get Microsoft.AspNetCore.Authentication.AuthenticationHandler in a class library?

$
0
0

I have a class library targeting .NET Standard 2.0 which contains custom authentication logic for ASP.NET (Core+) web applications. For example, it has an implementation of AuthenticationHandler along with applicable subclass of AuthenticationSchemeOptions and so forth. All of these are found in the Microsoft.AspNetCore.Authentication namespace.

In making a few minor updates to this lib, I noticed that one of the packages it relies on, Microsoft.AspNetCore.Authentication (v2.2.0) is deprecated. I want to fix that if possible without breaking backwards compatibility. Obviously it's quite core as it's what's providing the aforementioned functionality.

Is there an alternative package I can use to do this? The deprecation notice does not give any suggestions and I can't find anything anywhere else either. I've found a similar (although different, as it relates specifically to a Web API project) question here on SO but it has no satisfactory answers.

As I see it, I have the following options, none of which are ideal:

  1. Leave it as it is. Doesn't seem a good long-term approach.
  2. Update to a new .NET version (e.g. .NET 6). Maybe that will fix it? Maybe that namespace is now within the framework? Not sure. It'll break my package for older .NET versions though.
  3. Revert the package version from v2.2.0 to v2.1.2. Oddly that's not marked as deprecated - although that definitely seems like an oddity so not sure if that's intentional or a mistake that some of the 2.1.x line are this way.

I'm hoping I'm missing the proper solution somewhere.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>