Beispiel #1
0
        public async Task <IActionResult> Get()
        {
            var apsClient = await _clientFactory.ApsClient();

            var authorization = await apsClient.Authorize(new AuthorizationRequest { Action = "read", ResourceType = "Values" });

            if (!authorization.HasAccess)
            {
                return(Unauthorized());
            }

            var privateClient = await _clientFactory.PrivateApiClient();

            var values = await privateClient.GetValues();

            return(Ok(values));
        }