Example #1
0
		private void HandleLogoutResult(MethodCall logoutCall) {
			error = logoutCall.error;

			if (error == null) {
				isLogged = false;
				this.userId = null;
				this.token = null;
				this.tokenExpiration = default(DateTime);
			}
		}
Example #2
0
		private void HandleLoginResult(MethodCall loginCall) {
			error = loginCall.error;

			if (error == null) {
				JSONObject result = loginCall.result;
				isLogged = true;
				this.userId = result["id"].str;
				this.token = result["token"].str;
				this.tokenExpiration = result["tokenExpires"].GetDateTime();
			}
		}