diff --git a/src/Microsoft.AspNetCore.Authorization/IAuthorizationService.cs b/src/Microsoft.AspNetCore.Authorization/IAuthorizationService.cs index 369e3b5763..a130c84b0d 100644 --- a/src/Microsoft.AspNetCore.Authorization/IAuthorizationService.cs +++ b/src/Microsoft.AspNetCore.Authorization/IAuthorizationService.cs @@ -16,24 +16,39 @@ namespace Microsoft.AspNetCore.Authorization /// Checks if a user meets a specific set of requirements for the specified resource /// /// The user to evaluate the requirements against. - /// The resource to evaluate the requirements against. + /// + /// An optional resource the policy should be checked with. + /// If a resource is not required for policy evaluation you may pass null as the value. + /// /// The requirements to evaluate. /// - /// A flag indicating whether authorization has succeded. - /// This value is true when the user fulfills the policy otherwise false. + /// A flag indicating whether authorization has succeeded. + /// This value is true when the user fulfills the policy; otherwise false. /// + /// + /// Resource is an optional parameter and may be null. Please ensure that you check it is not + /// null before acting upon it. + /// Task AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable requirements); /// /// Checks if a user meets a specific authorization policy /// /// The user to check the policy against. - /// The resource the policy should be checked with. + /// + /// An optional resource the policy should be checked with. + /// If a resource is not required for policy evaluation you may pass null as the value. + /// /// The name of the policy to check against a specific context. /// - /// A flag indicating whether authorization has succeded. - /// This value is true when the user fulfills the policy otherwise false. + /// A flag indicating whether authorization has succeeded. + /// Returns a flag indicating whether the user, and optional resource has fulfilled the policy. + /// true when the the policy has been fulfilled; otherwise false. /// + /// + /// Resource is an optional parameter and may be null. Please ensure that you check it is not + /// null before acting upon it. + /// Task AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName); } } \ No newline at end of file