2 instantiations of AuthorizationMiddleware
Microsoft.AspNetCore.Authorization.Test (1)
AuthorizationMiddlewareTests.cs (1)
998
return new
AuthorizationMiddleware
(requestDelegate, policyProvider, services, logger);
Microsoft.AspNetCore.Security.Microbenchmarks (1)
AuthorizationMiddlewareBenchmark.cs (1)
22
_authorizationMiddleware = new
AuthorizationMiddleware
((context) => Task.CompletedTask, policyProvider);
55 references to AuthorizationMiddleware
Microsoft.AspNetCore.Authorization.Policy (7)
AuthorizationAppBuilderExtensions.cs (1)
18
/// Adds the <see cref="
AuthorizationMiddleware
"/> to the specified <see cref="IApplicationBuilder"/>, which enables authorization capabilities.
AuthorizationMiddleware.cs (6)
19
ILogger<
AuthorizationMiddleware
> logger) : AuthorizationMiddleware(next, policyProvider, services, logger)
40
private readonly ILogger<
AuthorizationMiddleware
>? _logger;
43
/// Initializes a new instance of <see cref="
AuthorizationMiddleware
"/>.
56
/// Initializes a new instance of <see cref="
AuthorizationMiddleware
"/>.
65
ILogger<
AuthorizationMiddleware
> logger) : this(next, policyProvider, services)
71
/// Initializes a new instance of <see cref="
AuthorizationMiddleware
"/>.
Microsoft.AspNetCore.Authorization.Test (47)
AuthorizationMiddlewareTests.cs (47)
32
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
50
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
52
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
71
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
90
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
92
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
112
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
114
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
133
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
135
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
155
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
157
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
177
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
179
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
203
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
204
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
246
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
254
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, services, logger.Object);
363
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
364
var
middleware = CreateMiddleware(next.Invoke, policyProvider, services, logger.Object);
397
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
398
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
432
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
470
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
492
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
512
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
534
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
552
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
572
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
593
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
613
var logger = new Mock<ILogger<
AuthorizationMiddleware
>>();
615
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object, logger: logger.Object);
637
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
661
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
690
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
711
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
733
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
756
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
777
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
801
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
841
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
864
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
890
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
929
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
955
var
middleware = CreateMiddleware(next.Invoke, policyProvider.Object);
994
private
AuthorizationMiddleware
CreateMiddleware(RequestDelegate requestDelegate = null, IAuthorizationPolicyProvider policyProvider = null, IServiceProvider services = null, ILogger<
AuthorizationMiddleware
> logger = null)
Microsoft.AspNetCore.Security.Microbenchmarks (1)
AuthorizationMiddlewareBenchmark.cs (1)
14
private
AuthorizationMiddleware
_authorizationMiddleware;