caloggins
11/17/2016 - 4:23 PM

Bootstrap.cs

public class Bootstrap : DefaultNancyBootstrapper
{

    protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
    {
        base.ApplicationStartup(container, pipelines);

        ConfigureStatelessAuth(container, pipelines);
    }

    private static void ConfigureStatelessAuth(TinyIoCContainer container, IPipelines pipelines)
    {
        var statelessAuthConfigurationFactory = container.Resolve<IStatelessAuthConfigurationFactory>();
        var configuration = statelessAuthConfigurationFactory.Create();

        StatelessAuthentication.Enable(pipelines, configuration);
    }
}