Software AG Products 10.11 | Using CentraSite | Runtime Governance | Access Token Management | Managing Access Tokens through Command Line Interface | Purging Expired or Inactive Access Tokens
 
Purging Expired or Inactive Access Tokens
Pre-requisites:
To purge expired, revoked, or inactive access tokens through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
CentraSite provides a command tool named purge accesstokens for this purpose.
*To purge expired or inactive access tokens
*Run the command purge accesstokens.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd purge accesstokens [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> [-keyType <KEY-TYPE>] [-beforeDate <BEFORE-DATE>] [-batchSize <BATCH-SIZE>]
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional). The URL of the CentraSite registry. For example, http://localhost:53307/CentraSite/CentraSite.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the registered CentraSite user identified by the parameter USER-ID.
KEY-TYPE
(Optional). The type of access tokens you want to purge: "APIKey", "OAuth", or "All". If you omit this parameter, CentraSite assumes the default "All" configuration.
BEFORE-DATE
(Optional). Purges the access tokens that were generated before the specified date. The date format defaults to yyyy-mm-dd.
When specifying the date, enclose the date value within "".
BATCH-SIZE
(Optional). The maximum number of access tokens you want to purge in a batch. The default value for the batch size is 500.
Note:
To purge the expired access tokens using the purge accesstokens command, you can optionally specify values for the following parameters:
*keyType
*untilDate
*batchSize
If you do not specify values for any of these optional parameters, CentraSite purges all the available expired access tokens.
Examples (all in one line):
Specifying access tokens of type API Key:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd purge accesstokens -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -keyType APIKey
Specifying access tokens of type OAuth 2.0:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd purge accesstokens -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -keyType OAuth
Providing the date:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd purge accesstokens -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -keyType OAuth -beforeDate "2014-12-30"
Providing the batch size:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd purge accesstokens-url http://localhost:53307/CentraSite/CentraSite-user Administrator -password manage-keyType OAuth -batchSize 1000