Esempio n. 1
0
 //with options
 public static IAppBuilder UseUserClaims(this IAppBuilder app,
                                         UserClaimsOptions options)
 {
     return(app.Use <UserClaimsMiddleware>(options));
 }
Esempio n. 2
0
        //default options
        public static IAppBuilder UseUserClaims(this IAppBuilder app)
        {
            var options = new UserClaimsOptions();

            return(app.Use <UserClaimsMiddleware>(options));
        }
Esempio n. 3
0
 public UserClaimsMiddleware(AppFunc next, UserClaimsOptions options)
 {
     _options = options ?? throw new ArgumentNullException(nameof(options));
     _next    = next ?? throw new ArgumentNullException(nameof(next));
 }