From Bright Pattern Documentation
< 5.19:Identity-provider-api-specification
Revision as of 04:02, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.3 • 5.8


Login

This method is used for applications that must pass the password in clear text (common for login pages over HTTPS).

The Login method can be used with the following applications:

  • Agent Desktop (i.e., "agentdesktop")
  • Wallboard (i.e., "wallboard")
  • Contact Center Administrator (i.e., "admin")

The same user may create multiple concurrent sessions for the same username and password.

HTTP Method

POST

Request

session_login(domain, username, password, application)

Example

POST /session_login HTTP/1.1
{"domain":"example.com",
"username":"tony.cobb",
"password":"password",
“ip_address”:”1.2.3.4”,
"application":"agentdesktop"}

Success Response

A success response includes a 200 OK with application/JSON body containing session_id.

Example

HTTP/1.1 200 OK
{
    “session_id”: “8439309F-4C70-44CF-9D92-FA0E56C97BD0”,
    "tenant_id":"4E3707BE-CD47-4627-A5D9-34EF70A0DE42",
    "user_id":"9E33BE47-47DF-40F7-B160-8B90E12FE6C5"
}

Error Responses

Error responses are returned with a 4xx HTTP response code and a JSON body containing detailed error information.

Code Description Example
400 Bad request (missing parameters, malformed request) -
403 Access denied
{ “error”: “account_disabled” } 
{ “error”: “tenant_disabled” }
{ “error”: “ip_address_not_allowed” }
{ “error”: “account_locked” } -  account locked out after too many invalid attempts
{ “error”: “wait_before_login” } - login attempts faster than every 5 seconds are not allowed
404 Not found
{ “error: invalid_user_name” }  - invalid user name
{ “error”: “invalid_domain” } - invalid tenant URL
< Previous | Next >