POST api/authorization/validateToken
Checks if the specified User Token is valid. Returns whether or not token is valid, the user role and in case the token is not valid, it provides the error message.
Request Information
URI Parameters
None.
Body Parameters
The parameters.
ValidateUserTokenParametersName | Description | Type | Additional information |
---|---|---|---|
token |
Gets or sets the User Token. |
globally unique identifier |
None. |
Request Formats
application/json, text/json
Sample:
{ "token": "801203e4-5e7a-409a-b203-c2fc3f3b7911" }
application/xml, text/xml
Sample:
<ValidateUserTokenParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nbdc.WebServices.Models.Authorization"> <token>801203e4-5e7a-409a-b203-c2fc3f3b7911</token> </ValidateUserTokenParameters>
Response Information
Resource Description
Returns whether or not token is valid, the user role and in case the token is not valid, it provides the error message.
ValidateUserTokenResponseName | Description | Type | Additional information |
---|---|---|---|
isValid |
Gets a value indicating whether the token is valid. |
boolean |
None. |
userRoles |
Gets the user roles. |
string |
None. |
errorMessage |
Gets the error message. |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "isValid": true, "userRoles": "sample string 2", "errorMessage": "sample string 3" }
application/xml, text/xml
Sample:
<ValidateUserTokenResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nbdc.WebServices.Models.Authorization"> <errorMessage>sample string 3</errorMessage> <isValid>true</isValid> <userRoles>sample string 2</userRoles> </ValidateUserTokenResponse>