1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-18 10:03:50 -05:00
bitwarden/bitwarden_license/src/Scim/Utilities/ScimContextMiddleware.cs
2022-08-29 16:06:55 -04:00

23 lines
700 B
C#

using Bit.Core.Repositories;
using Bit.Core.Settings;
using Bit.Scim.Context;
namespace Bit.Scim.Utilities;
public class ScimContextMiddleware
{
private readonly RequestDelegate _next;
public ScimContextMiddleware(RequestDelegate next)
{
_next = next;
}
public async Task Invoke(HttpContext httpContext, IScimContext scimContext, GlobalSettings globalSettings,
IOrganizationRepository organizationRepository, IOrganizationConnectionRepository organizationConnectionRepository)
{
await scimContext.BuildAsync(httpContext, globalSettings, organizationRepository, organizationConnectionRepository);
await _next.Invoke(httpContext);
}
}