5 implementations of AuthorizeAsync
Microsoft.AspNetCore.Authorization (1)
DefaultAuthorizationService.cs (1)
99public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName)
Microsoft.AspNetCore.Authorization.Test (2)
PolicyEvaluatorTests.cs (2)
174public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName) 183public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
Microsoft.AspNetCore.Components.Authorization.Tests (2)
TestAsyncAuthorizationService.cs (1)
31public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
TestAuthorizationService.cs (1)
28public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
11 references to AuthorizeAsync
Microsoft.AspNetCore.Authorization (1)
AuthorizationServiceExtensions.cs (1)
87return service.AuthorizeAsync(user, resource: null, policyName: policyName);
Microsoft.AspNetCore.Authorization.Test (10)
DefaultAuthorizationServiceTests.cs (10)
290var allowed = await authorizationService.AuthorizeAsync(null, null, "Basic"); 340var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => authorizationService.AuthorizeAsync(new ClaimsPrincipal(), "whatever", "BogusPolicy")); 596var allowed = await authorizationService.AuthorizeAsync(user, null, "Any"); 616var allowed = await authorizationService.AuthorizeAsync(user, null, "Any"); 649var allowed = await authorizationService.AuthorizeAsync(user, null, "Custom"); 670var allowed = await authorizationService.AuthorizeAsync(user, null, "Custom"); 711var allowed = await authorizationService.AuthorizeAsync(user, null, "Passthrough"); 739var allowed = await authorizationService.AuthorizeAsync(user, null, "Combined"); 766var allowed = await authorizationService.AuthorizeAsync(user, null, "Combined"); 793var allowed = await authorizationService.AuthorizeAsync(user, null, "Combined");