REST.Backend.EMSApi.TEMSClientAPI.DoAddAuthParameters

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoAddAuthParameters; overload;
procedure DoAddAuthParameters(AAuthentication: TAuthentication); overload;
procedure DoAddAuthParameters(const ARequest: TCustomRESTRequest; AAuthentication: TAuthentication); overload;

C++

void __fastcall DoAddAuthParameters(void)/* overload */;
void __fastcall DoAddAuthParameters(TAuthentication AAuthentication)/* overload */;
void __fastcall DoAddAuthParameters(Rest::Client::TCustomRESTRequest* const ARequest, TAuthentication AAuthentication)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
protected
REST.Backend.EMSApi.pas
REST.Backend.EMSApi.hpp
REST.Backend.EMSApi TEMSClientAPI

Description

Adds the configured authentication data to the headers of the specified request.

DoAddAuthParameters accepts the following parameters:

  • AAuthentication: Optional. The type of authentication parameter to add.
  • ARequest: Optional. The request to add the parameter to.

If you do not specify AAuthentication, the method uses the return value of GetActualAuthentication. If you do not specify ARequest, the method uses the value of the Request property. However, the method that lets you specify only the ARequest parameter is the AddAuthParameters.

AddAuthParameters calls DoAddAuthParameters.

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string.

Session token required

Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string.

See Also