AutoGRAPH.NET Service Login (EN) — различия между версиями

Материал из TK
Перейти к: навигация, поиск
(Новая страница: «If .config-file contains users-directory and devices-directory service will require authentication.…»)
 
(нет различий)

Текущая версия на 13:18, 11 февраля 2016

If .config-file contains users-directory and devices-directory service will require authentication. Authentication workflow process described here.

Login method check user login/password and return access token for using in all other requests.

WCF

Definition: string Login(string userName, string password)

Result:

  • access token if user passed authentication
  • exception UnauthorizedAccessException if userName, pass or user time range failed

JSON

Calling (Attention! You must be use POST method):

http://localhost:8300/Login

Request body must be passed in JSON format by method POST:

{"UserName": "demo", "Password":"demo"}

Result:

  • access token if user passed authentication
  • empty string and HTTP status code = 403 if userName, pass or user time range failed