API Endpoint
https://api.xure.co/v1/authentication/token

Get information related to an existing authentication token

Get User Details GET

Obtain details of the user account associated with the supplied authentication credentials

Parameters

Response Parameters
ParameterDescription
IsAuthenticated BooleanFlag indicates if an authenticated user is associated with the request
AuthenticatedUsername StringThe username assigned to the current authenticated userOptional
AuthenticatedName StringThe full name of the current authenticated userOptional

XML

Example Request
GET https://api.xure.co/v1/authentication/token.eb HTTP/1.1
Accept: text/xml
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="UserDetails">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="IsAuthenticated" type="xsd:boolean">
          <xsd:annotation>
            <xsd:documentation>Flag indicates if an authenticated user is associated with the request</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="AuthenticatedUsername" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The username assigned to the current authenticated user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="AuthenticatedName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The full name of the current authenticated user</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Response
HTTP/1.1 200 OK
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<UserDetails>
  <IsAuthenticated>xsd:boolean</IsAuthenticated>
  <AuthenticatedUsername>xsd:string</AuthenticatedUsername>
  <AuthenticatedName>xsd:string</AuthenticatedName>
</UserDetails>

JSON

Example Request
GET https://api.xure.co/v1/authentication/token.eb HTTP/1.1
Accept: application/json
Example Response
HTTP/1.1 200 OK
Content-Type: application/json

{"IsAuthenticated":Boolean,
  "AuthenticatedUsername":String,
  "AuthenticatedName":String}

Status Codes

Status and Error Codes
HTTP StatusError Code and Description
200

User details are returned in response

Test

Checking user authorisation status

Call the Get User Details method to verify the status of the authorisation credentials sent with the request (either a bearer token, session cookie or basic authentication).

The IsAuthenticated flag indicates if the supplied credentials are valid and map to a Xure user. If so, the AuthenticatedUsername and AuthenticatedName parameters give basic details of the authorised user account.

If no credentials are supplied with the request then IsAuthenticated returns false.