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": "cc6e553f-d73b-4065-8e5d-5bf4b6fab69d"
}

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>cc6e553f-d73b-4065-8e5d-5bf4b6fab69d</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>