Listener authenticates users based on LDAP configuration. To use a REST endpoint, you must be part of a valid Listener LDAP domain and log into Listener to obtain a token.
Definition
POST https://CLUSTER.DOMAIN/listener/appservices/users/login HTTP/1.1
Content-Type: application/json
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
Example Request
curl \
-H "Content-Type: application/json" \
-X POST \
-d '{"username": "USERNAME", "password": "PASSWORD"}' \
-i \
https://CLUSTER.DOMAIN/listener/appservices/users/login
Example Response
HTTP/1.1 200 OK Content-Type: application/json
{ "display_name": "name", "email": "email", "id": "username", "member_of": "member of list", "site_admin":true, "token":"unique token" }
Response Codes
Code | Description |
---|---|
200 | User successfully logged on and obtained a token. |
401 | User credentials cannot be validated. If the 401 API response code is received for any of the REST API calls to Listener, it means that either the authentication token is invalid or is missing. The user must obtain a new authentication token using the Login endpoint.
|
500 | LDAP is not configured or reachable. |