コード例 #1
0
ファイル: ImsiService.cs プロジェクト: rajey/openizdc
        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));
        }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
 /// <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");
 }
コード例 #4
0
ファイル: AmiService.cs プロジェクト: santedb/santedb-dc-core
        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);
        }
コード例 #5
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;
 }
コード例 #6
0
 /// <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>();
 }