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.

ValidateUserTokenParameters
NameDescriptionTypeAdditional information
token

Gets or sets the User Token.

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "token": "fa563355-7225-4295-bc21-785a70c436c7"
}

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>fa563355-7225-4295-bc21-785a70c436c7</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.

ValidateUserTokenResponse
NameDescriptionTypeAdditional 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>