Esempio n. 1
0
//		public string setServerAdd(string address){
//			char lastChar = address [address.Length];
//			if (lastChar.CompareTo ("/") == 0) {
//				return address.Substring (0, address.Length - 1);
//			};
//
//			return address;
//		}

        public void setTokenJson(string result)
        {
            Debug.Log("[AzureMobileAppRequest] " + result);
            var resultDic = (Dictionary <string, object>)JsonParser.Read2Object(result);

            cbAuth.token = (string)resultDic ["token"];
            Debug.Log("[token] " + cbAuth.token);
            var crypt = CBAuthentication.AES_decrypt(cbAuth.token, "1234567890123456", "1234567890123456");

            Debug.Log("[token decrypt] " + crypt);
        }
Esempio n. 2
0
        public static string getTokenData(string json, string key, string IV)
        {
            Debug.Log("[AzureMobileAppRequest] " + json);
            var resultDic = (Dictionary <string, object>)JsonParser.Read2Object(json);

            string token = (string)resultDic ["token"];

            Debug.Log("[token] " + token);

            var crypt = CBAuthentication.AES_decrypt(token, "1234567890123456", "1234567890123456");

            Debug.Log("[token decrypt] " + crypt);

            return(token);
        }
Esempio n. 3
0
 public AzureMobileAppRequestHelper(string azureEndPoint, string token /*, MobileServiceUser User*/)
 {
     cbAuth = new CBAuthentication();
 }
Esempio n. 4
0
 public AzureMobileAppRequestHelper()
 {
     cbAuth = new CBAuthentication();
 }