Fix misc feedback
This commit is contained in:
parent
38e89d498d
commit
34ee0212d0
|
|
@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
public object Resource { get; }
|
public object Resource { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the requirements that have not yet been succeeded.
|
/// Gets the requirements that have not yet been marked as succeeded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<IAuthorizationRequirement> PendingRequirements { get { return _pendingRequirements; } }
|
public IEnumerable<IAuthorizationRequirement> PendingRequirements { get { return _pendingRequirements; } }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
private IDictionary<string, AuthorizationPolicy> PolicyMap { get; } = new Dictionary<string, AuthorizationPolicy>(StringComparer.OrdinalIgnoreCase);
|
private IDictionary<string, AuthorizationPolicy> PolicyMap { get; } = new Dictionary<string, AuthorizationPolicy>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the default authoization policy.
|
/// Gets or sets the default authorization policy.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The default policy is to require any authenticated user.
|
/// The default policy is to require any authenticated user.
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
public IReadOnlyList<IAuthorizationRequirement> Requirements { get; }
|
public IReadOnlyList<IAuthorizationRequirement> Requirements { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a readonly list of rhe authentication schemes the <see cref="AuthorizationPolicy.Requirements"/>
|
/// Gets a readonly list of the authentication schemes the <see cref="AuthorizationPolicy.Requirements"/>
|
||||||
/// are evaluated against.
|
/// are evaluated against.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IReadOnlyList<string> AuthenticationSchemes { get; }
|
public IReadOnlyList<string> AuthenticationSchemes { get; }
|
||||||
|
|
@ -100,13 +100,13 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Combines the <see cref="AuthorizationPolicy"/> provided by the specified
|
/// Combines the <see cref="AuthorizationPolicy"/> provided by the specified
|
||||||
/// <paramref name="policyProvider"/>
|
/// <paramref name="policyProvider"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="policyProvider">A <see cref="IAuthorizationPolicyProvider"/> which provides the policies to combine.</param>
|
/// <param name="policyProvider">A <see cref="IAuthorizationPolicyProvider"/> which provides the policies to combine.</param>
|
||||||
/// <param name="authorizeData">A collection of authorization data used to apply authorization to a resource.</param>
|
/// <param name="authorizeData">A collection of authorization data used to apply authorization to a resource.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A new <see cref="AuthorizationPolicy"/> which represents the combination of the
|
/// A new <see cref="AuthorizationPolicy"/> which represents the combination of the
|
||||||
/// authorization policies provided by specified <paramref name="policyProvider"/>.
|
/// authorization policies provided by the specified <paramref name="policyProvider"/>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static async Task<AuthorizationPolicy> CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable<IAuthorizeData> authorizeData)
|
public static async Task<AuthorizationPolicy> CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable<IAuthorizeData> authorizeData)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
/// <param name="requirement">The requirement to evaluate the policy against.</param>
|
/// <param name="requirement">The requirement to evaluate the policy against.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A flag indicating whether requirement evaluation has succeeded or failed.
|
/// A flag indicating whether requirement evaluation has succeeded or failed.
|
||||||
/// This value is <value>true</value> when the user fulfills the policy otherwise <value>false</value>.
|
/// This value is <value>true</value> when the user fulfills the policy, otherwise <value>false</value>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object resource, IAuthorizationRequirement requirement)
|
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object resource, IAuthorizationRequirement requirement)
|
||||||
{
|
{
|
||||||
|
|
@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
/// <param name="policy">The policy to evaluate.</param>
|
/// <param name="policy">The policy to evaluate.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A flag indicating whether policy evaluation has succeeded or failed.
|
/// A flag indicating whether policy evaluation has succeeded or failed.
|
||||||
/// This value is <value>true</value> when the user fulfills the policy otherwise <value>false</value>.
|
/// This value is <value>true</value> when the user fulfills the policy, otherwise <value>false</value>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object resource, AuthorizationPolicy policy)
|
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object resource, AuthorizationPolicy policy)
|
||||||
{
|
{
|
||||||
|
|
@ -73,7 +73,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
/// <param name="policy">The policy to evaluate.</param>
|
/// <param name="policy">The policy to evaluate.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A flag indicating whether policy evaluation has succeeded or failed.
|
/// A flag indicating whether policy evaluation has succeeded or failed.
|
||||||
/// This value is <value>true</value> when the user fulfills the policy otherwise <value>false</value>.
|
/// This value is <value>true</value> when the user fulfills the policy, otherwise <value>false</value>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy)
|
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy)
|
||||||
{
|
{
|
||||||
|
|
@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
/// <param name="policyName">The name of the policy to evaluate.</param>
|
/// <param name="policyName">The name of the policy to evaluate.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A flag indicating whether policy evaluation has succeeded or failed.
|
/// A flag indicating whether policy evaluation has succeeded or failed.
|
||||||
/// This value is <value>true</value> when the user fulfills the policy otherwise <value>false</value>.
|
/// This value is <value>true</value> when the user fulfills the policy, otherwise <value>false</value>.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
|
public static Task<bool> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
/// Creates a new instance of <see cref="DefaultAuthorizationService"/>.
|
/// Creates a new instance of <see cref="DefaultAuthorizationService"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="policyProvider">The <see cref="IAuthorizationPolicyProvider"/> used to provide policies.</param>
|
/// <param name="policyProvider">The <see cref="IAuthorizationPolicyProvider"/> used to provide policies.</param>
|
||||||
/// <param name="handlers">The handlers used to fufills <see cref="IAuthorizationRequirement"/>s.</param>
|
/// <param name="handlers">The handlers used to fulfill <see cref="IAuthorizationRequirement"/>s.</param>
|
||||||
/// <param name="logger">The logger used to log messages, warnings and errors.</param>
|
/// <param name="logger">The logger used to log messages, warnings and errors.</param>
|
||||||
public DefaultAuthorizationService(IAuthorizationPolicyProvider policyProvider, IEnumerable<IAuthorizationHandler> handlers, ILogger<DefaultAuthorizationService> logger)
|
public DefaultAuthorizationService(IAuthorizationPolicyProvider policyProvider, IEnumerable<IAuthorizationHandler> handlers, ILogger<DefaultAuthorizationService> logger)
|
||||||
{
|
{
|
||||||
|
|
@ -47,7 +47,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a user meets a specific set of requirements for the specified resource
|
/// Checks if a user meets a specific set of requirements for the specified resource.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user to evaluate the requirements against.</param>
|
/// <param name="user">The user to evaluate the requirements against.</param>
|
||||||
/// <param name="resource">The resource to evaluate the requirements against.</param>
|
/// <param name="resource">The resource to evaluate the requirements against.</param>
|
||||||
|
|
@ -104,7 +104,7 @@ namespace Microsoft.AspNetCore.Authorization
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a user meets a specific authorization policy
|
/// Checks if a user meets a specific authorization policy.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user to check the policy against.</param>
|
/// <param name="user">The user to check the policy against.</param>
|
||||||
/// <param name="resource">The resource the policy should be checked with.</param>
|
/// <param name="resource">The resource the policy should be checked with.</param>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Authorization.Infrastructure
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
|
/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
|
||||||
/// that takes an user specified assertion.
|
/// that takes a user specified assertion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AssertionRequirement : IAuthorizationHandler, IAuthorizationRequirement
|
public class AssertionRequirement : IAuthorizationHandler, IAuthorizationRequirement
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue