Esempio n. 1
0
        public async Task <PersistedGrant> GetAsync(string key)
        {
            try
            {
                var persistedGrant = await _persistedGrantService.GetByKey(key);

                if (persistedGrant.IsSuccess &&
                    persistedGrant.Data != null)
                {
                    return(_mapper.Map <PersistedGrantDto, PersistedGrant>(persistedGrant.Data));
                }
            }
            catch (Exception exception)
            {
                _logger.LogInformation($"Can not get persisted grant {key}: {exception}");
            }

            return(null);
        }