//with options public static IAppBuilder UseUserClaims(this IAppBuilder app, UserClaimsOptions options) { return(app.Use <UserClaimsMiddleware>(options)); }
//default options public static IAppBuilder UseUserClaims(this IAppBuilder app) { var options = new UserClaimsOptions(); return(app.Use <UserClaimsMiddleware>(options)); }
public UserClaimsMiddleware(AppFunc next, UserClaimsOptions options) { _options = options ?? throw new ArgumentNullException(nameof(options)); _next = next ?? throw new ArgumentNullException(nameof(next)); }