Files
Umbraco-CMS/src/Umbraco.Tests/TestHelpers/ControllerTesting/AuthenticateEverythingExtensions.cs

19 lines
626 B
C#
Raw Normal View History

2017-09-23 10:08:18 +02:00
using System;
2017-09-14 19:29:12 +02:00
using Microsoft.Owin.Extensions;
using Owin;
namespace Umbraco.Tests.TestHelpers.ControllerTesting
{
public static class AuthenticateEverythingExtensions
{
public static IAppBuilder AuthenticateEverything(this IAppBuilder app)
{
if (app == null)
throw new ArgumentNullException("app");
app.Use(typeof(AuthenticateEverythingMiddleware), (object)app, (object)new AuthenticateEverythingMiddleware.AuthenticateEverythingAuthenticationOptions());
app.UseStageMarker(PipelineStage.Authenticate);
return app;
}
}
2017-09-23 10:08:18 +02:00
}