AutoGRAPH.NET Service Login (EN)

Материал из TK
Перейти к: навигация, поиск

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