public UserEntity UpdateUserEntity([RestMessage(RestMessageFormat.SimpleJson)] UserEntity user) { var query = NameValueCollection.ParseQueryString(MiniImsServer.CurrentContext.Request.Url.Query); ISecurityRepositoryService securityRepositoryService = ApplicationContext.Current.GetService <ISecurityRepositoryService>(); AuthenticationContext.Current?.Session?.ClearCached(); //IDataPersistenceService<UserEntity> persistenceService = ApplicationContext.Current.GetService<IDataPersistenceService<UserEntity>>(); return(securityRepositoryService.SaveUserEntity(user)); }
/// <summary> /// Security challenge child handler /// </summary> public SecurityRoleUserChildHandler(IRepositoryService <SecurityRole> roleRepository, IRepositoryService <SecurityUser> userRepository, ISecurityRepositoryService securityRepository, IRoleProviderService roleProvider, IPolicyEnforcementService pepService) { this.m_userRepository = userRepository; this.m_pep = pepService; this.m_roleRepository = roleRepository; this.m_securityRepository = securityRepository; this.m_roleProvider = roleProvider; }
/// <summary> /// Creates a new instance of this pub-sub manager /// </summary> public AdoPubSubManager(IServiceManager serviceManager, IPolicyEnforcementService policyEnforcementService, IConfigurationManager configurationManager, ISecurityRepositoryService securityRepository, IDataCachingService cachingService) { this.m_cache = cachingService; this.m_configuration = configurationManager.GetSection <AdoPubSubConfigurationSection>(); this.m_policyEnforcementService = policyEnforcementService; this.m_securityRepository = securityRepository; this.m_serviceManager = serviceManager; this.m_configuration.Provider.UpgradeSchema("SanteDB.Persistence.PubSub.ADO"); }
public IdentifiedData GetUser() { // this is used for the forgot password functionality // need to find a way to stop people from simply searching users via username... NameValueCollection query = NameValueCollection.ParseQueryString(MiniHdsiServer.CurrentContext.Request.Url.Query); var predicate = QueryExpressionParser.BuildLinqExpression <SecurityUser>(query); ISecurityRepositoryService securityRepositoryService = ApplicationContext.Current.GetService <ISecurityRepositoryService>(); return(null); //if (query.ContainsKey("_id")) // return securityRepositoryService.GetUser(Guid.Parse(query["_id"][0])); //else // return Bundle.CreateBundle(securityRepositoryService.FindUsers(predicate), 0, 0); }
/// <summary> /// DI constructor /// </summary> public SystemPolicySynchronizationJob(INetworkInformationService networkInformationService, ITickleService tickleService, IAdministrationIntegrationService amiIntegrationService, IOfflinePolicyInformationService offlinePip, IOfflineRoleProviderService offlineRps, ISecurityRepositoryService securityRepository, IJobStateManagerService jobStateManager, IDataPersistenceService <SecurityChallenge> securityChallengeService = null) { this.m_networkInformationService = networkInformationService; this.m_offlinePip = offlinePip; this.m_offlineRps = offlineRps; this.m_securityRepository = securityRepository; this.m_jobStateManager = jobStateManager; this.m_securityChallenge = securityChallengeService; this.m_amiIntegrationService = amiIntegrationService; this.m_tickleService = tickleService; }
/// <summary> /// Initializes a new instance of the <see cref="SecurityRoleResourceHandler"/> class. /// </summary> public SecurityRoleResourceHandler() { ApplicationContext.Current.Started += (o, e) => this.repository = ApplicationContext.Current.GetService <ISecurityRepositoryService>(); }