REST.Backend.EMSApi.TEMSClientAPI.LoginUser
Delphi
procedure LoginUser(const AUserName, APassword: string; out ALogin: TLogin; const AJSON: TJSONArray; AProc: TLoginProc); overload;
procedure LoginUser(const AUserName, APassword: string; AProc: TLoginProc); overload;
procedure LoginUser(const AUserName, APassword: string; out ALogin: TLogin; const AJSON: TJSONArray = nil); overload;
C++
void __fastcall LoginUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, /* out */ TLogin &ALogin, System::Json::TJSONArray* const AJSON, _di_TLoginProc AProc)/* overload */;
void __fastcall LoginUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, _di_TLoginProc AProc)/* overload */;
void __fastcall LoginUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, /* out */ TLogin &ALogin, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
Inhaltsverzeichnis
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
procedure function |
public | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
Beschreibung
Führt die Anmeldung beim EMS-Server durch und ruft die Authentifizierungsdaten ab, die TEMSClientAPI in weiteren Anforderungen verwendet.
LoginUser übernimmt die folgenden Parameter:
AUserName
ist der Benutzername des Benutzers, der sich anmeldet.APassword
ist das Passwort dieses Benutzernamens.ALogin
ist eine Instanz von TLogin, die LoginUser mit den vom EMS-Server gesendeten Authentifizierungsdaten füllt.AJSON
ist ein optionales JSON-Array, zu dem LoginUser das JSON-Objekt der Antwort vom EMS-Server hinzufügt.AProc
ist eine optionale Prozedur mit dem Typ TLoginProc. LoginUser ruft diese Prozedur mit den folgenden Parametern auf: dem Anmeldedatenobjekt (ALogin
) und dem JSON-Objekt, das der EMS-Server sendet.
Exceptions
Exception | Meldung | Beschreibung |
---|---|---|
MasterSecret erforderlich |
Authentication ist TAuthentication.MasterSecret und ConnectionInfo.MasterSecret ist ein leerer String. | |
Sitzungs-Token erwartet |
Die Antwort vom EMS-Server enthält kein Sitzungs-Token. Die Antwort vom EMS-Server muss ein JSON-Objekt der Anmeldedaten sein, das ein Schlüssel/Wertepaar mit dem Wert von TJSONNames.SessionToken als Schlüssel enthält. | |
Sitzungs-Token erforderlich |
Authentication ist TAuthentication.Session, und Sie haben sich nicht angemeldet oder das bei der Anmeldung (Login) angegebene Sitzungsauthentifizierungs-Token ist ein leerer String. |
Siehe auch
- REST.Backend.EMSApi.TEMSClientAPI.AddUser
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUser
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveCurrentUser
- REST.Backend.EMSApi.TEMSClientAPI.UpdateUser
- REST.Backend.EMSApi.TEMSClientAPI.QueryUserName
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUsersNames
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUsersFields
- REST.Backend.EMSApi.TEMSClientAPI.QueryUsers
- REST.Backend.EMSApi.TEMSClientAPI.SignupUser
- REST.Backend.EMSApi.TEMSClientAPI.LogoutUser
- REST.Backend.EMSApi.TEMSClientAPI.DeleteUser