상속: AbstractAccount
예제 #1
0
        public string visit()
        {
            if (creds.FederatedUid == VistaConstants.ADMINISTRATIVE_FEDERATED_UID)
            {
                creds.LocalUid = VistaAccount.getAdminLocalUid(creds.AuthenticationSource.SiteId.Id);
            }
            validateCredentials();
            setupVisit();
            MdoQuery request  = buildVisitRequest();
            string   response = (string)cxn.query(request);

            string[] flds = StringUtils.split(response, StringUtils.CRLF);
            if (!success(flds))
            {
                throw new UnauthorizedAccessException("Visit failed: Invalid credentials?");
            }
            if (flds.Length >= 8)
            {
                cxn.IsTestSource = (flds[7] == "0");
            }

            acct.IsAuthenticated = true;
            cxn.IsRemote         = true;

            //creds.AuthenticatorId = cxn.DataSource.SiteId.Id;
            //creds.AuthenticatorName = cxn.DataSource.SiteId.Name;

            return("OK");
        }
예제 #2
0
 public BseVista2WebVisit(VistaAccount acct, AbstractCredentials creds, DataSource validatorDataSource)
     : base(acct, creds)
 {
     if (validatorDataSource != null)
     {
         _validatorDataSource = validatorDataSource;
     }
 }
예제 #3
0
        //[MethodImpl(MethodImplOptions.Synchronized)]
        public static AbstractCredentials getAdministrativeCredentials(Site site)
        {
            AbstractCredentials credentials = new VistaCredentials();

            credentials.LocalUid             = VistaAccount.getAdminLocalUid(site.Id);
            credentials.FederatedUid         = "123456789";
            credentials.SubjectName          = "DEPARTMENT OF DEFENSE,USER";
            credentials.SubjectPhone         = "";
            credentials.AuthenticationSource = site.getDataSourceByModality("HIS");
            credentials.AuthenticationToken  = site.Id + '_' + credentials.LocalUid;
            return(credentials);
        }
예제 #4
0
 public VistaConnection(DataSource dataSource) : base(dataSource)
 {
     Account = new VistaAccount(this);
     if (ConnectTimeout == 0)
     {
         ConnectTimeout = CONNECTION_TIMEOUT;
     }
     if (ReadTimeout == 0)
     {
         ReadTimeout = READ_TIMEOUT;
     }
     port           = (dataSource.Port == 0) ? DEFAULT_PORT : dataSource.Port;
     sysFileHandler = new VistaSystemFileHandler(this);
 }
예제 #5
0
 public VistaConnection(DataSource dataSource)
     : base(dataSource)
 {
     Account = new VistaAccount(this);
     if (ConnectTimeout == 0)
     {
         ConnectTimeout = CONNECTION_TIMEOUT;
     }
     if (ReadTimeout == 0)
     {
         ReadTimeout = READ_TIMEOUT;
     }
     port = (dataSource.Port == 0) ? DEFAULT_PORT : dataSource.Port;
     sysFileHandler = new VistaSystemFileHandler(this);
 }
예제 #6
0
        internal void changeContext(AbstractConnection cxn)
        {
            VistaAccount acct = (VistaAccount)cxn.Account;

            //if (acct.Permissions.ContainsKey(VistaConstants.MDWS_CONTEXT))
            //{
            //    acct.setContext(acct.Permissions[VistaConstants.MDWS_CONTEXT]);
            //}
            //else
            //{
            //    acct.addContextInVista(cxn.Uid, new MenuOption(VistaConstants.MDWS_CONTEXT));
            //}
            if (acct.Permissions.ContainsKey(VistaConstants.DDR_CONTEXT))
            {
                acct.setContext(acct.Permissions[VistaConstants.DDR_CONTEXT]);
            }
            else
            {
                acct.addContextInVista(cxn.Uid, new MenuOption(VistaConstants.DDR_CONTEXT));
            }
        }
예제 #7
0
 public VisitTemplate(VistaAccount acct, AbstractCredentials credentials)
 {
     this.acct = acct;
     cxn = acct.Cxn;
     creds = credentials;
 }
예제 #8
0
 public NonBseVisit(VistaAccount acct, AbstractCredentials creds)
     : base(acct, creds)
 {
 }
예제 #9
0
 public BseVista2WebVisit(VistaAccount acct, AbstractCredentials creds, DataSource validatorDataSource)
     : base(acct, creds)
 {
     if (validatorDataSource != null)
     {
         _validatorDataSource = validatorDataSource;
     }
 }
예제 #10
0
 public NonBseVisit(VistaAccount acct, AbstractCredentials creds) : base(acct, creds)
 {
 }
예제 #11
0
 public VisitTemplate(VistaAccount acct, AbstractCredentials credentials)
 {
     this.acct = acct;
     cxn       = acct.Cxn;
     creds     = credentials;
 }