Skip to content

Commit b8611d9

Browse files
CopilotJamesNK
andcommitted
Fix XML comments for IAuthorizationService return values
Co-authored-by: JamesNK <[email protected]>
1 parent ff63c75 commit b8611d9

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
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/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)