Beispiel #1
0
        private static WebClientToken GetWebClientToken(Boolean refresh = false)
        {
            if (mClientToken.IsNull() || refresh)
            {
                mClientToken = new WebClientToken(Settings.Default.TestUserName, Settings.Default.TestClientApplicationName, WebServiceData.WebServiceManager.Key);
            }

            return(mClientToken);
        }
Beispiel #2
0
        public WebClientToken GetWebClientToken(Boolean refresh, String token)
        {
            CipherString cipherString;

            if (_clientToken.IsNull() || refresh || token.IsNotEmpty())
            {
                if (token.IsEmpty())
                {
                    _clientToken = new WebClientToken(TEST_USER_NAME, ApplicationIdentifier, WebServiceData.WebServiceManager.Key);
                }
                else
                {
                    cipherString = new CipherString();
                    token        = cipherString.EncryptText(token);
                    _clientToken = new WebClientToken(token, WebServiceData.WebServiceManager.Key);
                }
            }
            return(_clientToken);
        }