Obtaining authentication tokens

Content Software for File CLI Reference

Version
4.2.x
Audience
anonymous
Part Number
MK-HCSF001-03

The authentication tokens include two types: an access token and a refresh token.

  • Access token: The access token is a short-live token (five minutes) used for accessing the Content Software for File system API and to allow the mounting of secure filesystems.
  • Refresh token: The refresh token is a long-live token (one year) used for obtaining an additional access token.
Do one of the following:
  • To obtain the refresh token and access token, through the CLI, log in to the system using the command: weka user login. The system creates an authentication token file and saves it in: ~/.weka/auth-token.json. The token file contains both the access token and refresh token.
  • To obtain the refresh token and access token, through the REST API, use the POST /login. The API returns the token in the response body.