getAdminLocalUid() public static méthode

public static getAdminLocalUid ( string siteId ) : string
siteId string
Résultat string
Exemple #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");
        }
Exemple #2
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);
        }