During authentication, the REST API connector sends a POST request to your web server (API endpoint) in JSON format. The content of the request depends on the authentication method used (e.g., PAP, MS-CHAP, TTLS-PAP).
Authorization
header as a Bearer token.Parameter | Description |
---|---|
login |
The user's username |
password |
The user's password (only available with PAP or TTLS+PAP) |
auth_port |
RADIUS server authentication port that received the request |
mschap_challenge |
MS-CHAP challenge (only if using MS-CHAP) |
mschap_response |
MS-CHAP response (only if using MS-CHAP) |
curl -i -X POST https://YOUR_API_ENDPOINT \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"login": "user1",
"auth_port": "11111",
"mschap_challenge": "99999999",
"mschap_response": "888888888888888888"
}'
A 2xx
response indicates successful authentication. Attributes in the response will be added to the RADIUS reply and forwarded to the Wireless Controller.
HTTP/1.1 200 OK
Content-Type: application/json
{
"return_url": "https://www.google.com",
"valid_until": "2017/01/10 01:59:59 +0000",
"valid_from": "2017/01/09 02:03:52 +0000",
"nt_key": "abcd12345",
"membership_id": "123456",
"membership": {
"name": "John Sample",
"id": "12345678"
},
"id": "123456789abcdef",
"attributes": [
{
"name": "Tunnel-Private-Group-Id",
"value": "101",
"op": ":="
},
{
"name": "Acct-Interim-Interval",
"value": "300",
"op": ":="
}
]
}
A 4xx
response indicates authentication failure. The error message in the body will be used to reject the access request.
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
{
"errors": [
"Email/login or password incorrect."
]
}