示例#1
0
        public async Task <PersistedGrantDto> GetPersistedGrantAsync(string key)
        {
            var persistedGrant = await _persistedGrantRepository.GetPersistedGrantAsync(key);

            if (persistedGrant == null)
            {
                throw new UserFriendlyErrorPageException(string.Format(_persistedGrantServiceResources.PersistedGrantDoesNotExist().Description, key), _persistedGrantServiceResources.PersistedGrantDoesNotExist().Description);
            }
            var persistedGrantDto = persistedGrant.ToModel();

            return(persistedGrantDto);
        }
示例#2
0
        public virtual async Task <PersistedGrantDto> GetPersistedGrantAsync(string key)
        {
            var persistedGrant = await PersistedGrantRepository.GetPersistedGrantAsync(key);

            if (persistedGrant == null)
            {
                throw new UserFriendlyErrorPageException(string.Format(PersistedGrantServiceResources.PersistedGrantDoesNotExist().Description, key), PersistedGrantServiceResources.PersistedGrantDoesNotExist().Description);
            }
            var persistedGrantDto = persistedGrant.ToModel();

            await AuditEventLogger.LogEventAsync(new PersistedGrantRequestedEvent(persistedGrantDto));

            return(persistedGrantDto);
        }