Validate Token v2
post
/jderest/v2/tokenrequest/validate
Determine if the the token passed is still valid.
Request
Supported Media Types
- application/json
Header Parameters
-
jde-AIS-Auth(optional): string
Token
-
jde-AIS-Auth-Device(optional): string
Device Name
-
jde-AIS-MonitorOnStart(optional): boolean
Monitor on Start
-
jde-AIS-MonitorRequest(optional): string
Monitor RequestAllowed Values:
[ "monitorRequest", "monitorRequestIO" ]
The input to the tokenrequest/validate service.
Root Schema : ValidateRequest
Type:
object
The input to the tokenrequest/validate service.
Show Source
-
deviceName(optional):
string
An identifier for the device making the service call. If not provided, the requesting IP address is used.
-
environment(optional):
string
Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
-
externalJwt(optional):
string
-
jasserver(optional):
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(optional):
string
The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
-
psToken(optional):
string
Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
-
role(optional):
string
The role to use for login. If not specified, the default role configured for the AIS Server will be used.
-
token(optional):
string
The AIS token, which is required if other authentication methods are not being used.
-
touch(optional):
boolean
Touch the user session to extend the session timeout.
-
username(optional):
string
JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
Response
Supported Media Types
- application/json
- application/xml
200 Response
Successful Execution - Token is Valid
400 Response
Bad Request - Invalid JSON Input
403 Response
Token is Invalid
415 Response
Invalid Content-Type Header - Must use application/json
444 Response
Invalid Token
Root Schema : ServiceErrorResponse
Type:
object
Error Response
Show Source
-
errorText(optional):
string
-
exception(optional):
string
The class of the exception if an exception was thrown.
-
exceptionId(optional):
string
ExceptionId, only if an exception record was written to the F980060
-
message(optional):
string
Details about the error.
-
status(optional):
string
Allowed Values:
[ "ERROR", "WARNING" ]
Status determined by exception handling -
timeStamp(optional):
string
The timestamp indicating the time the error message was returned.
-
type(optional):
string
Optional type of error
-
userDefinedErrorText(optional):
string
Optional error text added to an orchestration step.
500 Response
Server Failed to Process Request
Root Schema : ServiceErrorResponse
Type:
object
Error Response
Show Source
-
errorText(optional):
string
-
exception(optional):
string
The class of the exception if an exception was thrown.
-
exceptionId(optional):
string
ExceptionId, only if an exception record was written to the F980060
-
message(optional):
string
Details about the error.
-
status(optional):
string
Allowed Values:
[ "ERROR", "WARNING" ]
Status determined by exception handling -
timeStamp(optional):
string
The timestamp indicating the time the error message was returned.
-
type(optional):
string
Optional type of error
-
userDefinedErrorText(optional):
string
Optional error text added to an orchestration step.
Examples
Example Request - Basic
The following shows an example of a token validation request which is used to determine if a token is still valid.
curl -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/v2/tokenrequest/validate -d { "token": "044RCAgER+J6ZDUAZgotcr4Xju0x33EUSOJZzW8xFc2Gtk=MDE5MDEzMzQzNDYxMzc3NTc5ODc3NDA3NTEwLjEzOS4xMTEuODMxNTE2MTE1MzQ4Mjgw" }
Example Response - Valid
The following example shows the contents of the response body when the token is valid. The response status code will be 200.
{ "isValidSession":true }
Example Response - Invalid
The following example shows one possible value for the response body when the token is invalid. It is best to use the status code for consistent determination of token validity. Anything other than a 200 status is an invalid token.
{ "message" : "Invalid Token", "exception" : "java.lang.Exception", "timeStamp" : "2018-01-16:15.17.29" }