REST.Client.TRESTClient.Authenticator

提供:RAD Studio API Documentation

Delphi

property Authenticator: TCustomAuthenticator read GetAuthenticator write SetAuthenticator;

C++

__property Authenticator;

プロパティ

種類 可視性 ソース ユニット
property published
REST.Client.pas
REST.Client.hpp
REST.Client TRESTClient

説明

サーバーに対する認証に使用される、TCustomAuthenticator のサブクラスのインスタンスです。 {{#multireplace:REST.Client.TRESTClient.Authenticator|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} は {{#multireplace:REST.Client.TCustomRESTClient.Authenticator|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を継承しています。以下の内容はすべて {{#multireplace:REST.Client.TCustomRESTClient.Authenticator|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} を参照しています。

サーバーに対する認証に使用される、TCustomAuthenticator のサブクラスのインスタンスです。

Authenticator はデフォルトでは nil です。つまり、認証が行われないということです。

TCustomRESTClient は、それ自身の認証コンポーネントの所有者になります。その結果、Authenticator プロパティに新しい値を割り当てても、前の認証コンポーネントを破棄する必要はありません。

コード例

Delphi の場合:

LClient := TCustomRESTClient.Create('http://www.example.com');
LBasicAuth := THTTPBasicAuthenticator.Create('JaneDoe', 'secret');
LClient.Authenticator := LBasicAuth;
C++ の場合:
TCustomRESTClient* LClient = new TCustomRESTClient("http://www.example.com");
THTTPBasicAuthenticator* LBasicAuth = new THTTPBasicAuthenticator("JaneDoe", "secret");
LClient->Authenticator = LBasicAuth;

関連項目