private static void AddPoliciesToClaims(string[] policies, IIamProvider iamProvider, IIamProviderCache iamProviderCache) { foreach (var policy in policies) { iamProvider.AddClaim(policy, policy, iamProviderCache).Wait(); } }
private static void TogglePolicyResourceIdAccess(string[] policies, IIamProvider iamProvider, IIamProviderCache iamProviderCache) { foreach (var policy in policies) { iamProvider.ToggleResourceIdAccess(policy, true, iamProviderCache).Wait(); } }
private static void AddPoliciesToRoles(string[] policies, string[] roles, IIamProvider iamProvider, IIamProviderCache iamProviderCache) { foreach (var policy in policies) { foreach (var role in roles) { iamProvider.AddRole(policy, role, iamProviderCache).Wait(); } } }
public IamAuthorizationPolicyProvider(IOptions <AuthorizationOptions> options, IIamProvider iamProvider, IIamProviderCache iamProviderCache) : base(options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } _options = options.Value; _iamProvider = iamProvider ?? throw new ArgumentNullException(nameof(iamProvider)); _iamProviderCache = iamProviderCache ?? throw new ArgumentNullException(nameof(iamProviderCache)); }