Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This service creates a user alias token that allows an external application to perform actions within your XNAT as a valid logged-in user. This service should be used with caution.

Contents


Issue A New User Alias Token

This REST service creates a new user alias token for the currently logged-in user.

GET - /data/services/tokens/issue

Parameters: None


Response:
Returns an alias token object for the logged-in user account

{
  "alias": "string",
  "xdatUserId": "string",
  "secret": "string",
  "singleUse": boolean,
  "estimatedExpirationTime": timestamp,
  "timestamp": timestamp,
  "enabled": boolean,
  "created": timestamp,
  "id": integer,
  "disabled": integer
}


Issue A New User Alias Token For Another User

This REST service creates a new user alias token for a different user. This endpoint can only be used by users with site admin access.

GET - /data/services/tokens/issue/user/{username}

Parameters:

{username}Required path parameter. Enter a valid username

Response:

{
  "alias": "string",
  "xdatUserId": "string",
  "secret": "string",
  "singleUse": boolean,
  "estimatedExpirationTime": timestamp,
  "timestamp": timestamp,
  "enabled": boolean,
  "created": timestamp,
  "id": integer,
  "disabled": integer
}


Validate A User Alias Token

GET - /data/services/tokens/validate/{token}/{secret}

Parameters:

{token}Required path parameter
{secret}Required path parameter

Response:

If token is valid
{"valid":"username"}
If token is invalid
{}


Invalidate A User Alias Token

GET - /data/services/tokens/invalidate/{token}/{secret}

Parameters:

{token}Required path parameter
{secret}Required path parameter

Response: None


  • No labels