Exemple #1
0
        /// <inheritdoc/>
        public async Task <bool> WritePolicyAsync(string org, string app, Stream fileStream)
        {
            if (fileStream == null)
            {
                throw new ArgumentException("The policy file can not be null");
            }

            string filePath = PolicyHelper.GetAltinnAppsPolicyPath(org, app);
            Response <BlobContentInfo> response = await _policyRepository.WritePolicyAsync(filePath, fileStream);

            return(response?.GetRawResponse()?.Status == (int)HttpStatusCode.Created);
        }
Exemple #2
0
        /// <inheritdoc/>
        public async Task <XacmlPolicy> GetPolicyAsync(string org, string app)
        {
            string policyPath = PolicyHelper.GetAltinnAppsPolicyPath(org, app);

            return(await GetPolicyInternalAsync(policyPath));
        }