public void login_with_password(string username, string password, string version, string originator) { try { if (JsonRpcClient != null) { opaque_ref = JsonRpcClient.session_login_with_password(username, password, version, originator); } else { opaque_ref = XmlRpcProxy.session_login_with_password(username, password, version, originator).parse(); } SetupSessionDetails(); } catch (Failure exn) { if (exn.ErrorDescription[0] == Failure.MESSAGE_PARAMETER_COUNT_MISMATCH) { // Call the pre-2.0 version instead. login_with_password(username, password, version); } else { throw; } } }
/// <summary> /// Change the password on the given session2, using this session for the connection. /// </summary> /// <param name="session2">The session to change</param> /// <param name="oldPassword"></param> /// <param name="newPassword"></param> public void change_password(Session session2, string oldPassword, string newPassword) { if (JsonRpcClient != null) { JsonRpcClient.session_change_password(session2.opaque_ref, oldPassword, newPassword); } else { XmlRpcProxy.session_change_password(session2.opaque_ref, oldPassword, newPassword).parse(); } }
public void slave_local_login_with_password(string username, string password) { if (JsonRpcClient != null) { opaque_ref = JsonRpcClient.session_slave_local_login_with_password(username, password); } else { opaque_ref = XmlRpcProxy.session_slave_local_login_with_password(username, password).parse(); } //assume the latest API APIVersion = API_Version.LATEST; }
public void login_with_password(string username, string password) { if (JsonRpcClient != null) { opaque_ref = JsonRpcClient.session_login_with_password(username, password); } else { opaque_ref = XmlRpcProxy.session_login_with_password(username, password).parse(); } SetupSessionDetails(); }
public void local_logout(string opaqueRef) { if (opaqueRef == null) { return; } if (JsonRpcClient != null) { JsonRpcClient.session_local_logout(opaqueRef); } else { XmlRpcProxy.session_local_logout(opaqueRef).parse(); } }
/// <summary> /// Log out of the session with the given reference, using this session for the connection. /// </summary> /// <param name="_self">The session to log out</param> public void logout(string _self) { if (_self == null) { return; } if (JsonRpcClient != null) { JsonRpcClient.session_logout(_self); } else { XmlRpcProxy.session_logout(_self).parse(); } }