Aspnetcore: Please consider splitting the AzureAD package apart to reduce dependencies

Created on 19 Dec 2018  路  3Comments  路  Source: dotnet/aspnetcore

I have a lightweight ASP.NET Core Web API project. It has no front end, and thus doesn't need most of what is bundled with the Microsoft.AspNetCore.Mvc package. I can generally use Microsoft.AspNetCore.Mvc.Core package instead.

Except that I need AAD authentication, and when I pull in Microsoft.AspNetCore.Authentication.AzureAD.UI it takes Microsoft.AspNetCore.Mvc as a dependency...

Looking through the code, it seems like there are some controllers and pre-compiled Razor views being included, so I understand why you need the full Mvc package to support those.

It would be great if you could split out the core AAD auth from the UI components, such that those of us who don't need the UI don't need to take the dependency on the big Mvc package. Something like this perhaps:

  • Microsoft.AspNetCore.Authentication.AzureAD.UI

    • Microsoft.AspNetCore.Mvc

    • Microsoft.AspNetCore.Authentication.AzureAD.Core

    • Microsoft.AspNetCore.Authentication.Cookies

    • Microsoft.AspNetCore.Authentication.JwtBearer

    • Microsoft.AspNetCore.Authentication.OpenIdConnect

Thanks.

area-security feature-AADIntegration

All 3 comments

Closing because there are no plans to make any changes to this. The UI part is the bulk of what's in this feature, so if we split that out, there would be almost nothing left.

@Eilon - It is still useful without the UI views for WebAPI projects. In ours, I have:

            services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
                .AddAzureAD(options => Configuration.Bind("AzureAd", options))
                .AddAzureADBearer(options => Configuration.Bind("AzureAd", options));

How would I do the equivalent without the Microsoft.AspNetCore.Authentication.AzureAD.UI package?

To unblock my team, I've temporarily copied the source locally and removed the UI components. It works well, but now this code is out-of-band for future maintenance. It would be good if it was built this way naturally.

@mj1856 understood, but at this time there are still no plans for this due to general lack of demand, so the priority is just too low.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UweKeim picture UweKeim  路  3Comments

ermithun picture ermithun  路  3Comments

farhadibehnam picture farhadibehnam  路  3Comments

Kevenvz picture Kevenvz  路  3Comments

groogiam picture groogiam  路  3Comments