REST.Backend.EMSServices.TEMSLoginAPI.LoginUser

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure LoginUser(const AUserName, APassword: string;
AProc: TFindObjectProc); overload;
procedure LoginUser(const AUserName, APassword: string;
out AUser: TBackendEntityValue; const AJSON: TJSONArray); overload;

C++

void __fastcall LoginUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, Rest::Backend::Servicetypes::_di_TFindObjectProc AProc)/* overload */;
void __fastcall LoginUser(const System::UnicodeString AUserName, const System::UnicodeString APassword, /* out */ Rest::Backend::Metatypes::TBackendEntityValue &AUser, System::Json::TJSONArray* const AJSON)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
protected
REST.Backend.EMSServices.pas
REST.Backend.EMSServices.hpp
REST.Backend.EMSServices TEMSLoginAPI

Description

Logs into the EMS server and obtains authentication data that you can use in future requests.

You must specify the username of the user that logs in (AUserName) and the password of that username (APassword).

To handle the received information, you must provide either of the following:

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

The type of authentication is TAuthentication.MasterSecret and the MasterSecret property of the connection information of the underlying EMS backend service is an empty string.

Session token expected

The response from the EMS server does not contain a session token.

The response from the EMS server must be a JSON object of login data that contains a key-value pair with the value of TJSONNames.SessionToken as key.

Session token required

The type of authentication is TAuthentication.Session you did not log in.

See Also