Skip to content

Commit 8eeda31

Browse files
CopilotJamesNK
andauthored
Fix XML comments for return values on IAuthorizationService (#62765)
Co-authored-by: James Newton-King <[email protected]>
1 parent 18c8e4b commit 8eeda31

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public static class AuthorizationServiceExtensions
2121
/// <param name="resource">The resource to evaluate the policy against.</param>
2222
/// <param name="requirement">The requirement to evaluate the policy against.</param>
2323
/// <returns>
24-
/// A flag indicating whether requirement evaluation has succeeded or failed.
25-
/// This value is <c>true</c> when the user fulfills the policy, otherwise <c>false</c>.
24+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether requirement evaluation has succeeded or failed.
25+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
2626
/// </returns>
2727
public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement)
2828
{
@@ -40,8 +40,8 @@ public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationServic
4040
/// <param name="resource">The resource to evaluate the policy against.</param>
4141
/// <param name="policy">The policy to evaluate.</param>
4242
/// <returns>
43-
/// A flag indicating whether policy evaluation has succeeded or failed.
44-
/// This value is <c>true</c> when the user fulfills the policy, otherwise <c>false</c>.
43+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed.
44+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
4545
/// </returns>
4646
public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy)
4747
{
@@ -58,8 +58,8 @@ public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationServic
5858
/// <param name="user">The user to evaluate the policy against.</param>
5959
/// <param name="policy">The policy to evaluate.</param>
6060
/// <returns>
61-
/// A flag indicating whether policy evaluation has succeeded or failed.
62-
/// This value is <c>true</c> when the user fulfills the policy, otherwise <c>false</c>.
61+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed.
62+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
6363
/// </returns>
6464
public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy)
6565
{
@@ -76,8 +76,8 @@ public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationServic
7676
/// <param name="user">The user to evaluate the policy against.</param>
7777
/// <param name="policyName">The name of the policy to evaluate.</param>
7878
/// <returns>
79-
/// A flag indicating whether policy evaluation has succeeded or failed.
80-
/// This value is <c>true</c> when the user fulfills the policy, otherwise <c>false</c>.
79+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed.
80+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
8181
/// </returns>
8282
public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
8383
{

src/Security/Authorization/Core/src/DefaultAuthorizationService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public DefaultAuthorizationService(IAuthorizationPolicyProvider policyProvider,
5656
/// <param name="resource">The resource to evaluate the requirements against.</param>
5757
/// <param name="requirements">The requirements to evaluate.</param>
5858
/// <returns>
59-
/// A flag indicating whether authorization has succeeded.
60-
/// This value is <c>true</c> when the user fulfills the policy, otherwise <c>false</c>.
59+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded.
60+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
6161
/// </returns>
6262
public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements)
6363
{
@@ -93,8 +93,8 @@ public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal us
9393
/// <param name="resource">The resource the policy should be checked with.</param>
9494
/// <param name="policyName">The name of the policy to check against a specific context.</param>
9595
/// <returns>
96-
/// A flag indicating whether authorization has succeeded.
97-
/// This value is <c>true</c> when the user fulfills the policy otherwise <c>false</c>.
96+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded.
97+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
9898
/// </returns>
9999
public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName)
100100
{

src/Security/Authorization/Core/src/IAuthorizationService.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public interface IAuthorizationService
2222
/// </param>
2323
/// <param name="requirements">The requirements to evaluate.</param>
2424
/// <returns>
25-
/// A flag indicating whether authorization has succeeded.
26-
/// This value is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
25+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded.
26+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the user fulfills the policy; otherwise <c>false</c>.
2727
/// </returns>
2828
/// <remarks>
2929
/// Resource is an optional parameter and may be null. Please ensure that you check it is not
@@ -41,9 +41,8 @@ public interface IAuthorizationService
4141
/// </param>
4242
/// <param name="policyName">The name of the policy to check against a specific context.</param>
4343
/// <returns>
44-
/// A flag indicating whether authorization has succeeded.
45-
/// Returns a flag indicating whether the user, and optional resource has fulfilled the policy.
46-
/// <c>true</c> when the policy has been fulfilled; otherwise <c>false</c>.
44+
/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded.
45+
/// The result's <see cref="AuthorizationResult.Succeeded"/> property is <c>true</c> when the policy has been fulfilled; otherwise <c>false</c>.
4746
/// </returns>
4847
/// <remarks>
4948
/// Resource is an optional parameter and may be null. Please ensure that you check it is not

0 commit comments

Comments
 (0)