コード例 #1
0
        public OpenIdBearerInjectorMiddleware(RequestDelegate next, OpenIdBearerInjectorOptions options)
        {
            _next = next ?? throw new ArgumentNullException(nameof(next));

            _options = options ?? throw new ArgumentNullException(nameof(options));

            if (null == options.OpenIdSettings)
            {
                throw new ArgumentNullException(nameof(options.OpenIdSettings));
            }
        }
コード例 #2
0
        public static IApplicationBuilder UseOpenIdBearerInjector(this IApplicationBuilder app, OpenIdBearerInjectorOptions options)
        {
            if (null == app)
            {
                throw new ArgumentNullException(nameof(app));
            }

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

            return(app.UseMiddleware <OpenIdBearerInjectorMiddleware>(options));
        }