Esempio n. 1
0
        public async Task <ApiKeyViewModel> GetApiKeyByIdAsync(int keyId)
        {
            var apiKey = await apiKeyRepository.GetApiKeyByIdAsync(keyId);

            if (apiKey == null)
            {
                return(null);
            }
            var mappedKey = mapper.Map <ApiKeyViewModel>(apiKey);

            mappedKey.Key = await encryptionService.DecryptString(mappedKey.Key);

            return(mappedKey);
        }