GuidesAuthentication
Overview
Authentication covers how to login (authenticate against the API endpoint) and get the privileges, against which organization(s) and site(s) the admin is granted to.
See If Login Already
Get ‘whoami’ and privileges (which org and which sites I have access to)
GET /api/v1/selfResponse if a valid session has been created
Status: 200 OK
{
"email": "test@mistsys.com",
"first_name": "John",
"last_name": "Smith",
"phone": "14081112222",
"phone2": "",
"via_sso": false,
"tags": [ "has_8021x", "mist" ]
}Definitions
| Name | Type | Description |
|---|---|---|
email | string | email of logged-in user |
first_name | string | first name of logged-in user |
last_name | string | last name of logged-in user |
phone | string | phone number (numbers only, including country code) |
phone2 | string | secondary phone number (numbers only, including country code) |
via_sso | boolean | an admin login via_sso is more restricted. (password and email cannot be changed) |
tags | list | list of strings indicating capabilities. e.g. what to show/hide/disable/enable for this user |
Response if two-factor authentication is pending
Status: 200 OK
{
"email": "test@mistsys.com",
"privileges": null,
"two_factor_required": true,
"two_factor_passed": false
}Login Lookup
POST /api/v1/login/lookupExample
{
"email": "test@mistsys.com"
}Parameter
| Name | Type | Description |
|---|---|---|
email | string | Required. |
Response if user does not exist
Status: 404 Not FoundResponse if local account exists
Status: 200 OK
Response if SSO user exists
Status: 200 OK
{
"sso_url": "https://my.sso/idp_sso_url"
}Logout
POST /api/v1/logoutResponse
Status: 200 OK
{
// if configured in SSO as custom_logout_url
"forward_url": "https://my.sso/custom_logout_url"
}