Integration Server 11.1 | Built-In Services Reference Guide | OAuth Folder | Summary of Elements in this Folder | pub.oauth:removeExpiredAccessTokens
 
pub.oauth:removeExpiredAccessTokens
WmPublic. Removes expired OAuth access tokens from the database.
Input Parameters
maxRows
String. Optional. Maximum number of rows containing expired tokens to be deleted from the database, where each row contains a single expired access token. If you specify 0 or do not specify a value, the service removes all of the rows containing expired tokens from the database.
Output Parameters
removedTokensCount
String Number of expired tokens removed by the service. If the service did not remove any expired tokens to be removed, the value of removedTokensCount is 0.
Usage Notes
To improve the performance of the pub.oauth:removeExpiredAccessTokens service, create the following two database indexes:
*Create index idx_oauth_tmp_idx on IS_OAUTH_ACCESSTOKEN(TOKEN_ID);
*Create index idx_oauth_tmp_idx2 on IS_OAUTH_REFRESHTOKEN(TOKEN_ID);
The pub.oauth:removeExpiredAccessTokens service deletes expired access tokens from the database by performing a series of delete operations in the database. The service deletes the expired tokens in batches. The server configuration property watt.server.oauth.token.removal.batchSize controls the batch size. The size of the batches defaults to 1000.
Integration Server uses the Remove Expired Tokens system task to check for and remove expired OAuth tokens. This system task executes the pub.oauth:removeExpiredAccessTokens service at a regular interval determined by the watt.server.oauth.token.removal.interval server configuration parameter. The value of the watt.server.oauth.token.removal.maxRows parameter determines the number of tokens the task deletes.