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"); }
public BseVista2WebVisit(VistaAccount acct, AbstractCredentials creds, DataSource validatorDataSource) : base(acct, creds) { if (validatorDataSource != null) { _validatorDataSource = validatorDataSource; } }
//[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); }
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); }
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)); } }
public VisitTemplate(VistaAccount acct, AbstractCredentials credentials) { this.acct = acct; cxn = acct.Cxn; creds = credentials; }
public NonBseVisit(VistaAccount acct, AbstractCredentials creds) : base(acct, creds) { }