Request a Token v2
post
/v2/tokenrequest
Request an AIS token to be used for subsequent requests. Authentication is performed with given credentials and a session token is returned.
Request
Supported Media Types
- application/json
Header Parameters
-
jde-AIS-Auth-Device: string
Device Name
-
jde-AIS-Auth-Environment: string
Environment
-
jde-AIS-Auth-Role: string
Role
-
jde-AIS-MonitorOnStart: boolean
Monitor on Start
-
jde-AIS-MonitorRequest: string
Monitor RequestAllowed Values:
[ "monitorRequest", "monitorRequestIO" ]
Input is not required; Authentication headers may be used instead.
Root Schema : LoginRequest
Type:
object
The input to a token request.
Show Source
-
applicationName:
string
A proxy application associated with a mobile or ADF app. If you pass this value the login service will attempt to get security and processing options for the application.
-
deviceName:
string
An identifier for the device making the service call. If not provided, the requesting IP address is used.
-
environment:
string
Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
-
jasserver:
string
The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
-
password:
string
The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
-
psToken:
string
Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
-
role:
string
The role to use for login. If not specified, the default role configured for the AIS Server will be used.
-
token:
string
The AIS token, which is required if other authentication methods are not being used.
-
username:
string
JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
Security
-
Authorization: apiKey
Type:
apiKey
Description:JWT Token
-
basicAuth: basic
Type:
basic
Description:
Response
Supported Media Types
- application/json
- application/xml
200 Response
Successful Execution
400 Response
Bad Request - Invalid JSON Input
403 Response
Authorization Failure
405 Response
Allowed Hosts on the HTML server is not configured to accept requests from this AIS Server
415 Response
Invalid Content-Type Header - Must use application/json
445 Response
Mobile SSO Failed
446 Response
Mobile SSO Requested, but SSO is not Enabled on this AIS Server
500 Response
Server Failed to Process Request
Examples
Example Requests
There are four ways to include credentials in a token request: basic authentication, JWT bearer token, username and password in the body, and PS Token.
Basic Authorization Request
curl -i -X POST -H "Content-Type:application/json" -H "Authorization: Basic SkRFOkpERQ==" http://ais_server_url/jderest/tokenrequest
Basic Authorization Request with Overrides
curl -i -X POST -H "Content-Type:application/json" -H "Authorization: Basic SkRFOkpERQ==" http://ais_server_url/jderest/tokenrequest -d { "deviceName":"MyDevice", "environment":"JPD920", "role":"JDEADMIN" }
Username/Password Request
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/tokenrequest -d { "deviceName":"MyDevice", "username":"JDE", "password":"JDE" }
JWT Token Request (Note that JWT token support requires configuration on the HTML Server.)
curl -i -X POST -H "Content-Type:application/json" -H "Authorization: Bearer eyJ4NXQiOiJ0aE5iRXZfbWFjdUExaG53..." http://ais_server_url/jderest/tokenrequest
PS Token Request
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/tokenrequest -d { "username":"JDE", "psToken":"kdfjoerjioejiowerjke..." }
Example Response
The following example shows the contents of the response body.
{ "username": "JDE", "environment": "JDV920", "role": "*ALL", "jasserver": "http://jas_server_url", "userInfo": { "token": "0448Pf+4aytugDOBJsaGdF6iyKpRaWazb9+GC1ubN4qKDw=MDE5MDA4MTg3MDY5MzQxMDcyODQ1MDAzOU15RGV2aWNlMTQ3ODYzODQ2MTQ2Mg==", "langPref": " ", "locale": "en", "dateFormat": "MDE", "dateSeperator": "/", "simpleDateFormat": "MM/dd/yyyy", "decimalFormat": ".", "addressNumber": 1, "alphaName": "Financial/Distribution Company", "appsRelease": "E920", "country": " ", "username": "JDE" }, "userAuthorized": false, "version": null, "poStringJSON": null, "altPoStringJSON": null, "aisSessionCookie": "cDxFuGIaMbAfre8q43mIULN15UNQRMZI3FwwV2GZ4qAsLX20iRh6!541095169!1478638461466", "adminAuthorized": true }