30 references to AuthorizeAsync
Microsoft.AspNetCore.Authorization.Test (30)
DefaultAuthorizationServiceTests.cs (29)
44
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
65
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
87
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
107
var allowed = await authorizationService.
AuthorizeAsync
(new ClaimsPrincipal(), "Custom");
134
var allowed = await authorizationService.
AuthorizeAsync
(new ClaimsPrincipal(), "Custom");
185
var allowed = await authorizationService.
AuthorizeAsync
(new ClaimsPrincipal(), "Custom");
214
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
236
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
257
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
276
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
305
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
326
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
473
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
501
var allowed = await authorizationService.
AuthorizeAsync
(user, "Hao");
527
var allowed = await authorizationService.
AuthorizeAsync
(user, "Hao");
549
var allowed = await authorizationService.
AuthorizeAsync
(user, "Hao");
571
var allowed = await authorizationService.
AuthorizeAsync
(user, "Hao");
970
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
989
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
1028
var allowed = await authorizationService.
AuthorizeAsync
(user, "Basic");
1068
Assert.False((await authorizationService.
AuthorizeAsync
(user, "0")).Succeeded);
1069
Assert.True((await authorizationService.
AuthorizeAsync
(user, "1")).Succeeded);
1070
Assert.True((await authorizationService.
AuthorizeAsync
(user, "2")).Succeeded);
1071
Assert.False((await authorizationService.
AuthorizeAsync
(user, "3")).Succeeded);
1087
var result = await authorizationService.
AuthorizeAsync
(null, "Fail");
1128
Assert.False((await authorizationService.
AuthorizeAsync
(null, "Success")).Succeeded);
1147
Assert.False((await authorizationService.
AuthorizeAsync
(null, "Success")).Succeeded);
1211
var result = await authorizationService.
AuthorizeAsync
(user, "Log");
1245
var result = await authorizationService.
AuthorizeAsync
(user, "Log");
PassThroughAuthorizationHandlerTests.cs (1)
41
var allowed = await authorizationService.
AuthorizeAsync
(new ClaimsPrincipal(), "Self");