In order to perform certain operations, authentication may be required. This GET operation performs authentication against the application, setting a session cookie if successful.
GET /authenticate/login
Name | Description |
---|---|
userName | The username to authenticate with |
Type: String | |
Default: None | |
password | The password to authenticate with |
Type: String | |
Default: None |
None
GET /authenticate/login?userName=foo&password=bar
HTTP/1.1 200 OK
Content-Type: text/plain
Login successful
HTTP/1.1 200 OK
Content-Type: text/plain
You are already logged in as a user
HTTP/1.1 200 OK
Content-Type: text/plain
incorrect password or user name
HTTP/1.1 200 OK
Content-Type: text/plain
user name and password must have a value
With this GET operation, the session for a currently authenticated user can be closed.
GET /authenticate/logout
none
None.
GET /authenticate/logout
HTTP/1.1 200 OK
Content-Type: text/plain
successfully logged out
HTTP/1.1 200 OK
Content-Type: text/plain
currently not authenticated
With this GET operation, the current authentication status (authenticated or not) can be retrieved, as well the user name and any associated roles if authenticated. Both global roles as well as per-datastock permissions are shown.
GET /authenticate/status
none
Name | Description |
---|---|
authInfo | Contains the elements that describe the authentication status. |
Type: Container | |
Ancestors: None | |
authenticated | Indicates whether the session is currently authenticated or not. |
Type: Boolean | |
Ancestors: authInfo | |
userName | The username for the current session |
Type: String | |
Ancestors: authInfo | |
role | One entry for each role associated for the current session |
Type: String | |
may occur multiple times | |
Ancestors: authInfo |
GET /authenticate/status
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<authInfo xmlns="http://www.ilcd-network.org/ILCD/ServiceAPI">
<authenticated>true</authenticated>
<userName>admin</userName>
<role>ADMIN</role>
<role>SUPER_ADMIN</role>
</authInfo>
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<authInfo xmlns="http://www.ilcd-network.org/ILCD/ServiceAPI">
<authenticated>true</authenticated>
<userName>foobar</userName>
<dataStock root="true">
<uuid>42217b74-22ba-4bda-78b6-faa412d0ac9f</uuid>
<shortName>PRIVATE_DATASTOCK</shortName>
<role>READ</role>
<role>EXPORT</role>
<role>WRITE</role>
<role>IMPORT</role>
<role>CHECKIN</role>
<role>CHECKOUT</role>
<role>RELEASE</role>
<role>CREATE</role>
<role>DELETE</role>
</dataStock>
<dataStock root="false">
<uuid>2996a429-b1ec-4b3b-a654-0c3a02afaa3d</uuid>
<shortName>PUBLIC</shortName>
<role>READ</role>
<role>EXPORT</role>
</dataStock>
</authInfo>
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<authInfo xmlns="http://www.ilcd-network.org/ILCD/ServiceAPI">
<authenticated>false</authenticated>
</authInfo>