Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.9 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.9 KB

Decos.AspNetCore

Build status

This repository contains custom middleware and other additions for ASP.NET Core.

Decos.AspNetCore.Authorization

Nuget

Currently, this package provides middleware that uses the Microsoft Graph API to add claims for every Active Directory group an authenticated user is a member of. For this, it relies on the Microsoft.Identity.Web code which was not officially released on NuGet. We have provided a NuGet package for this, with some minor changes to reduce the required dependencies.

Usage

public void ConfigureServices(IServiceCollection services)
{
    // ...
    services.AddGraphApiClaims(); // <--
    // ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    app.UseAuthentication();
    app.UseGraphApiClaims(); // <--
    app.UseMvc();
}

Decos.AspNetCore.BackgroundTasks

Nuget

This package provides a QueueBackgroundWorkItem implementation as provided in aspnet/Extensions issue #805.

Use the IServiceCollection.AddBackgroundTasks extension to provide an IBackgroundTaskQueue for queueing work items and a hosted service that runs the queue.