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": "4f28df21-cb95-4aaa-af76-0c5e48001efe" }
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>4f28df21-cb95-4aaa-af76-0c5e48001efe</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>