Beispiel #1
0
        public async Task <IEnumerable <PersistedGrant> > GetAllAsync(string subjectId)
        {
            try
            {
                var persistedGrants = await _persistedGrantService.GetAllBySubjectId(subjectId);

                if (persistedGrants != null &&
                    persistedGrants.Data != null)
                {
                    return(_mapper.Map <IEnumerable <PersistedGrantDto>, IEnumerable <PersistedGrant> >(persistedGrants.Data));
                }
            }
            catch (Exception exception)
            {
                _logger.LogInformation($"Can not get all persisted grant with subject {subjectId}: {exception}");
            }

            return(null);
        }