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 */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
説明
EMS サーバーにログインし、TEMSClientAPI により今後の要求で使用される認証データを取得します。
LoginUser が受け取るパラメータは次のとおりです。
AUserName
: ログインするユーザーのユーザー名です。APassword
: そのユーザー名のパスワードです。ALogin
: EMS サーバーから送信される認証データを LoginUser メソッドで格納するのに使用する TLogin インスタンスです。AJSON
(省略可能): LoginUser で EMS サーバーからの応答の JSON オブジェクトを追加する JSON 配列です。AProc
(省略可能): TLoginProc 型の手続きです。LoginUser では、ログイン データ オブジェクト(ALogin
)と EMS サーバーから送信される JSON オブジェクトをパラメータとして、この手続きを呼び出します。
例外
例外 | メッセージ | 説明 |
---|---|---|
MasterSecret が必要です |
Authentication が TAuthentication.MasterSecret で、ConnectionInfo.MasterSecret が空の文字列になっています。 | |
セッション トークンが必要です |
EMS サーバーからの応答にセッション トークンが含まれていません。 EMS サーバーからの応答は、TJSONNames.SessionToken の値をキーとするキー/値ペアが格納されたログイン データの JSON オブジェクトでなければなりません。 | |
セッション トークンが必要です |
Authentication が TAuthentication.Session で、まだログインしていないか、Login に渡したセッション認証トークンが空の文字列になっています。 |
関連項目
- 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