Unit
ScRestClient
Description
TScRestAuthenticator is a base class that defines a unified interface for all REST request authenticators. Instances of this class handle the authentication process for each request, relieving developers from managing authentication manually.
Each TScRestRequest component is linked to a TScRestClient instance, which references an authenticator such as TScRestBasicAuthenticator. This connection ensures that the TScRestAuthenticator.Execute method is automatically called before each request is sent. During execution, the method performs the authentication procedure by adding the necessary fields to the request header.
To implement custom authentication logic, developers can derive new classes from TScRestAuthenticator. The ScRestAuthenticator unit includes several built-in authenticators: TScRestBasicAuthenticator, TScRestAPIKeyAuthenticator, and TScRestBearerAuthenticator.
See also