Exemple #1
0
        public static IAppBuilder UseBasicAuthentication(this IAppBuilder app,
                                                         string realm, BasicAuthenticationMiddleware.CredentialValidationFunction validationFunction)
        {
            var options = new BasicAuthenticationOptions(realm, validationFunction);

            return(app.UserBasicAuthentication(options));
        }
Exemple #2
0
 public static IAppBuilder UserBasicAuthentication(this IAppBuilder app, BasicAuthenticationOptions options)
 {
     return(app.Use <BasicAuthenticationMiddleware>(options));
 }