23.119. Class AuthorizationPolicyProvider
Namespace: ArmoniK.Core.Common.Auth.Authorization
Assembly: ArmoniK.Core.Common.dll
Class used by the authorization middleware to generate the policy from its name and configuration
public class AuthorizationPolicyProvider : IAuthorizationPolicyProvider
23.119.1. Inheritance
23.119.2. Implements
23.119.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
23.119.4. Constructors
23.119.4.1. AuthorizationPolicyProvider(IOptionsMonitor<AuthenticatorOptions>)
Creates the authorization policy provider from the options
public AuthorizationPolicyProvider(IOptionsMonitor<AuthenticatorOptions> options)
23.119.4.1.1. Parameters
options IOptionsMonitor<AuthenticatorOptions>
Options
23.119.5. Methods
23.119.5.1. GetAlwaysTruePolicyAsync()
Get an authorization policy accepting anything
public static Task<AuthorizationPolicy> GetAlwaysTruePolicyAsync()
23.119.5.1.1. Returns
Policy returning true all the time
23.119.5.2. GetDefaultPolicyAsync()
Get an authorization policy where the user needs to be authenticated
public Task<AuthorizationPolicy> GetDefaultPolicyAsync()
23.119.5.2.1. Returns
Default authorization policy
23.119.5.3. GetFallbackPolicyAsync()
Get a null authorization policy, falling back to other policies
public Task<AuthorizationPolicy?> GetFallbackPolicyAsync()
23.119.5.3.1. Returns
Null policy (fallback)
23.119.5.4. GetPolicyAsync(string)
Get the policy associated with the given name
public Task<AuthorizationPolicy?> GetPolicyAsync(string policyName)
23.119.5.4.1. Parameters
policyName string
Name of the policy
23.119.5.4.2. Returns
Authorization policy