URI
<services_uri>/security/login[.<format>]
Supported methods
Parent resource
Introduction
The login page. Projected pages can only be accessed after login and authentication.
Supported Methods:
- GET: Gets the login form.
- POST: Submits user name and password to login.
- HEAD: Checks whether the login resource exists or whether it has permission to access the login resource.
Supported output formats: rjson, json, html, xml.
Resource hierarchy
HTTP request methods
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/services/security/login.rjson
GET request
Gets the login form.
Submits user name and password to login.
Request parameter
Following arguments need to be included in the request sent.
| Name | Type | Description |
| username | String | [Required] User name. |
| password | String | [Required] Password. |
| rememberme | boolean | Remember me. If set to true, the status will be remembered for the login next time. Default is False. |
Response structure
Description:
| Field | Type | Description |
| succeed | boolean | Whether the login is successful. |
| referer | String | The page that is redirected to after login. |
Response example
Implement the Post request on the login resource : http://localhost:8090/iserver/services/security/login.rjson
{
"username": "user1",
"password": "user1",
"rememberme": "true"
}
The response result in rjson format returned is as follows:
{
"succeed": true,
"referer": "/iserver/manager"
}
HEAD request
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the login resource exists, or if the login resource can be accessed by clients. It can also determine if the login resource supports an output format <format> if performed on a URI with .<format> included.