UNPKG

apinode

Version:

An API server that can greatly reduce the work needed to implment API services. It can also cooperate with other API node to make it a mesh of services.

75 lines 1.92 kB
{ "id": { "en": "No identifier.", "zh": "沒有識別碼。" }, "url": "admin/user/login", "descTx": { "en": "Login an user. If successful, the returning result will include an additional property **token** which details the access token.", "zh": "使用者登錄。若登入成功,回傳的結果除一般的 code, message 以及 value 三個屬性外,還會有一個 token 屬性作為後續的認證之用。" }, "query": [ { "key": "accName", "descTx": { "en": "User account name.", "zh": "使用者帳號。必要參數。" }, "required": true }, { "key": "passwd", "descTx": { "en": "User password. Required. The client side has to hash & salt the password before sending it out.", "zh": "使用者密碼。必要參數。子端程式應先以雜湊函數(hash function)編碼後送出。" }, "required": true } ], "out": [ { "key": "userID", "descTx": { "en": "The user ID", "zh": "使用者識別碼。" } }, { "key": "dspName", "descTx": { "en": "Nickname or the display name of the login user.", "zh": "使用者膩稱" } } ], "error": { "1": { "en": "Account name is missing.", "zh": "缺帳號資訊" }, "2": { "en": "Password is missing.", "zh": "缺密碼資訊" }, "3": { "en": "Login failed.", "zh": "登入失敗" } }, "token": [ { "key": "token", "descTx": { "en": "", "zh": "存取密鑰 (access token)。每個 request 都需要提出有效的存取密鑰才會被准許執行。" } }, { "key": "validTo", "descTx": { "en": "A timestamp (in milliseconds) to show the experiation time of the token.", "zh": "一個 timestamp 記錄存取密鑰的失效時間。" } } ] }