public NancyFormsAuthMiddleware(Func <IDictionary <string, object>, Task> next, FormsAuthenticationConfiguration formsAuthenticationConfiguration, IClaimsPrincipalLookup claimsPrincipalLookup) { _next = next; _formsAuthenticationConfiguration = formsAuthenticationConfiguration; _claimsPrincipalLookup = claimsPrincipalLookup; }
public static IAppBuilder UseNancyAuth(this IAppBuilder builder, FormsAuthenticationConfiguration formsAuthenticationConfiguration, IClaimsPrincipalLookup claimsPrincipalLookup) { builder.Use(typeof(NancyFormsAuthMiddleware), new object[] { formsAuthenticationConfiguration, claimsPrincipalLookup }); return(builder); }