public static IApplicationBuilder UseApiAuthorized(this IApplicationBuilder builder, ApiAuthorizedOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            return(builder.UseMiddleware <RequesUserLoginMiddleware>(Options.Create(options)));
        }
 public RequesUserLoginMiddleware(RequestDelegate next, IOptions <ApiAuthorizedOptions> options)
 {
     _next    = next;
     _options = options.Value;
 }