IPTP Developer

Developer

  • Getting started
    • Docker
    • MarkDown
    • Merge
  • ESB
    • Configuration
  • XM
    • API
    • Chats
    • ERP Integration
    • Messages
    • Sync
  • IPTP ID
    • Integration
  • Ugene
    • API
    • Error codes
    • How create plugin
  • Live assistance api
    • API

IPTP ID Integration

Step 1. “GENERATE ERP TOKEN”

  1. [Front-end] User clicks on “Login with ERP credentials”. Front-end sent a request to BackEnd

  2. [Back-end] Received request from FE, Generates a random token, and sent it to ERP ‘https://erp.iptp.net/erp/iptpidset':

{
    "app": "{App Name}",
    "token": "{Any Random token)",
    "success" : "{callback_success_link}",
    "error": "{callback_error_link}",
    "timestamp": {{timestamp_in_ms}}
}
  1. [ERP server] Process Back-end request, stores it and returns status 204.

  2. [Back-end] Receives successful ERP response and then returns just generated token to Front-end along with HTTP status 200

  3. [Front-end] Receives Back-end response, stores token value and shows login form.

Step 2. “VALIDATE ERP CREDENTIALS”

  1. [Front-end] User fills username/password and Front-end sent a request to Back-end along with token received in previous step:
{
    "token": "{Token_Received_From_Back-end}",
    "login": "{User_ERP_login}",
    "password": "{User_ERP_password}"
}

  1. [Back-end] Sent request to ERP ‘https://erp.iptp.net/erp/Login':
{
    "app": "{App Name}",
    "token": "{Token_Received_From_Back-end}",
    "login": "{User_ERP_login}",
    "password": "{User_ERP_password}"
}
  1. [ERP server ] Handles request from Back-end, validates credentials. If credentials are OK, returns HTTP status OK (200) along with user info. Otherwise should return HTTP status 401 as response. (Currently it is returning OK with plain text response body as “error”).

  2. [Baack-end] If ERP server response is OK, Back-end determines user from “EMail” attribute of ERP response and returns OK (200) with session. Otherwise returns HTTP status 401 as response.