Skip to main content
Skip table of contents

User Sessions

Before you execute any requests to the Cantara server, you must first establish a login session by executing the following request:

XML
URL: http://[hostname]:[port]/cantara/service/server/login/[environment] 
Request-Method: POST

Where environment refers to the Cantara Access Server environment you are trying to log into. For example, E1DEV. You would have previously configured this value when you set up your environment. Refer to the Managing Environments topic for more information.

You can obtain a list of configured environments by using the console to Search for an Environment.

The login service expects a payload with the three parameters (Function Request) 'username', 'password' and 'application'. The username and password should be the credentials of a valid JDE user that can log into the environment you are trying to connect to. The application name should be a unique name for the application or client that is connecting to the Cantara Access Server.

Once the request has been successfully executed, a response is returned. If the login is successful, information about the logged in user will be provided as defined in the JDE environment. If the login fails, the message payload contains the corresponding error. Included in the response is a login token which can be used to re-establish an expired session. In the case where you wish to use the token you would submit this in a parameter named token in replacement of the password parameter. This enables you to provide blind login functionality from a client without have to securely store the user's password within the client application.

Warning:

User sessions expire after a timeout period that is defined by the session expiry on the Java application server instance that the Cantara Access Server is deployed on. Once the timeout period has been reached, your application must reestablish the session with Cantara by consuming the login service again. You can choose to either resubmit the users login credentials or make use of the login token if it is enable on the server.

Example: How to Use Login Service

Endpoint: https://cantara.rinami.com/cantara/service/server/login/E1DEV

Request-Method: POST

Content-Type: application/json

Request Payload

JS
{
  "Parameter": [
    {
      "name": "username",
      "value": "jbloggs"
    },
    {
      "name": "password",
      "value": "MyPassword"
    },
	{
	  "name": "application",
	  "value": "Demo"
	}
  ],
  "name": "Login"
}

Response Payload

JS
{  
   "Parameter":[  
      {  
         "value":"JBLOGGS",
         "name":"username"
      },
      {  
         "value":"1003",
         "name":"addressNo"
      },
      {  
         "value":"Joe Bloggs",
         "name":"addressNoAlphaName"
      },
      {  
         "value":"",
         "name":"jobQueue"
      },
      {  
         "value":"100003",
         "name":"branch"
      },
      {  
         "value":"100003",
         "name":"branchAddressNo"
      },
      {  
         "value":"00100",
         "name":"branchCompany"
      },
      {  
         "value":"",
         "name":"branchCostCenterType"
      },
      {  
         "value":"Default Branch",
         "name":"branchDescription"
      },
      {  
         "value":"",
         "name":"approvalRouteCode"
      },
      {  
         "value":"",
         "name":"approvalRouteCodeAddressNo"
      },
      {  
         "value":"",
         "name":"approvalRouteCodeCompany"
      },
      {  
         "value":"",
         "name":"approvalRouteCodeCostCenterType"
      },
      {  
         "value":"",
         "name":"approvalRouteCodeDescription"
      },
      {  
         "value":"",
         "name":"dateFormat"
      },
      {  
         "value":"",
         "name":"dateSeparator"
      },
      {  
         "value":"",
         "name":"decimalCharacter"
      },
      {  
         "value":"51",
         "name":"timeZone"
      },
      {  
         "value":"Brisbane",
         "name":"timeZoneDescription"
      },
      {  
         "value":"(UTC+10:00)",
         "name":"timeZoneDescription2"
      },
      {  
         "value":"",
         "name":"timeZoneSpecialHandling"
      },
      {  
         "value":"12",
         "name":"timeFormat"
      },
      {  
         "value":"",
         "name":"daylightRule"
      },
      {  
         "value":"15c35a2103e4921bb2d478e735fcb299e2767d4e86324f48b63250d37c94dc9d",
         "name":"token"
      }
   ],
   "Message":{  
      "value":"Transaction Successful",
      "type":0,
      "sessionId":"15526.1450218228.190"
   },
   "name":"Login"
}   
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.