Rest API Connector

Rest API Connector

This page described format of messages for external authentication using REST API.

During the authentication process, Rest API connector will POST information in JSON format to your web server (API endpoint) for verification. Information included in the request will depend on authentication method - PAP, MS-CHAP, TTLS-PAP etc. Each request is authorized with an API token included with every request as a Bearer token.


List of variables sent to external server:

login - contains user's username

password - user's password, available only with PAP and TTLS+PAP authentication method

auth_port - RADIUS server authentication port that received this request

mschap_challenge - if using MS-CHAP authentication method

mschap_response - if using MS-CHAP authentication method


Sample Request:

$ 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"}'


Response Status Codes:

2** - return status code indicates success and sample body provides user attributes, access will be approved

HTTP/1.1 200 OK
{"return_url":"","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"},{"name":"Acct-Interim-Interval","value":"300"}]}


Attributes from the answer will be added to the RADIUS server response and sent to the Wireless Controller.

4** - return status code indicates failure and body provides error message, access will be denied

HTTP/1.1 422 Unprocessable Entity
{"errors":["Email/login or password incorrect."]}