Working with Tokens


Catalyst CLI provides tokens that validate your CLI sessions by associating them with a particular user account. When you are logged in to your CLI, the commands you execute are authenticated by a token internally. However, you can also generate a token manually, and use it to perform all the CLI activities without an active login session.

Tokens are highly useful when you access Catalyst CLI from a remote system, such as a Continuous Integration system, where you need not log in to the CLI exclusively. You can provide authentication for the CI system to access Catalyst and remotely execute CLI commands using a CLI token you generate.

A CLI token can be generated only when you are logged in to a user account from the CLI. Once generated, you can then use that token anywhere from any device to perform CLI operations remotely, even without active login sessions. This token acts as an authenticating factor for that user account, and continues to map your command executions to a project that you specify.

You can also provide tokens for a particular user account to the collaborators of your Catalyst project and allow them to perform CLI operations, without having to provide them the user login credentials.

When a token is generated, a unique ID is created to identify that token. You must use this token ID while revoking a token.

You must keep the following important points in mind while using tokens:

  • A token can only be generated from a CLI and can only be used in a CLI terminal. You will not be able to work with tokens outside of a CLI environment.
  • When you generate a token on a particular device’s terminal, you will be able to revoke that token from the same terminal only. You will not be able to revoke it from another device’s terminal. However, you can use that token to perform CLI operations from any device or environment.
  • A token is associated with the data center of the user account that it was generated with. Catalyst will therefore be accessed from the same data center, when you use a token with your command executions.
  • A token generated in Catalyst CLI is valid forever. It will not expire unless you personally revoke it.
  • You can create multiple tokens for a user account and use any of those tokens at any time from any device.
Note: If you are a Visual Studio Code IDE user, you can install the Catalyst Tools extension, and perform CLI operations using your IDE in place of the CLI. Steps to manage your authentication tokens in Visual Studio Code IDE can be found here.

Last Updated 2024-03-22 17:59:45 +0530 +0530