示例#1
0
 public Request(GlobalConfigurationModel configuration, IRelyingPartyRepository relyingPartyRepository, IDelegationRepository delegationRepository)
 {
     _configuration = configuration;
     _relyingPartyRepository = relyingPartyRepository;
     _delegationRepository = delegationRepository;
 }
        public void UpdateConfiguration(GlobalConfigurationModel updatedConfiguration)
        {
            using (var entities = IdentityServerConfigurationContext.Get())
            {
                var entity = Mapper.Map<GlobalConfigurationModel, GlobalConfigurationEntity>(updatedConfiguration);
                entity.Name = StandardConfigurationName;

                entities.Global.Attach(entity);
                entities.Entry(entity).State = EntityState.Modified;

                entities.SaveChanges();
                _cacheRepository.Invalidate(GlobalConfigurationCacheKey);
                _cacheRepository.Invalidate(Constants.CacheKeys.WSFedMetadata);
            }
        }
示例#3
0
 public Request(GlobalConfigurationModel configuration)
 {
     _configuration = configuration;
 }