Icon Web Server Authentication API

The authentication API requests use a remote procedure call style that is structured as follows:

<Origin>/authentication?method=<Method>

<Origin> = <Protocol>://<Domain>[:<Port>]

<Method> = Authentication method name

Information The "authentication" resource name is the default resource name for authentication requests. The authentication resource name is configurable in the web server. Please make sure that the resource name that you are using matches the proper resource name on the target web server.

Any content included with authentication API requests, or returned as a response to the request, should/will be formatted as JSON content. The date/time format used in the JSON content is equivalent to a raw JavaScript Date value: an integer value representing the number of milliseconds since 1 January 1970 UTC.

Information Any forward slashes present in any JSON content returned as a response by the authentication API will be escaped so that the JSON content can be included in HTML without issues.


Authenticate Request
The authenticate request authenticates the user and password provided in the included JSON content. If a session is already active and the user is authenticated, then the user will be deauthenticated before being authenticated. If the authentication fails for any reason, the request will result in a 500 Internal Error HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/authentication?method=authenticate

Example Request Content:

{
   "User": "Administrator",
   "Password": "EWBDefault"
}

HTTP Response: 200 on success or 500 on error


Deauthenticate Request
If a session is already active and the user is authenticated, then the user will be deauthenticated. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

Example Request:

https://localhost/authentication?method=deauthenticate

Example Request Content: None

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Get Effective Access Request
The get effective access request retrieves the currently assigned roles and privileges for an authenticated user. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: GET

HTTP Response Content Type: application/json; charset=utf-8

Example Request:

https://localhost/authentication?method=geteffectiveaccess

Example Response Content:

{
   "Roles": ["Developers", "Public"],
   "Privileges": ["UploadFiles", "DownloadFiles", "GetFiles", "DebugApplication"]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error
Image