Getting a token

There are two ways to get a token: in the console of the ionadmin module or through the token service of the rest module.

All generated tokens are stored in the ion_user_tokens collection in the application database.

Getting a permanent token via the ionadmin module

To get a token via the admin console, go to the navigation item “Web Service Security Keys” in the ionadmin module, for example, at locahost:8888/ionadmin/token

On the “Security Token Generator” page:

  • Enter the user name in the “User Name” field
  • Specify “local” value in the “Account Type” field
  • Click the “Generate Token” button
  • The “Token” field will display a token value similar to 3a546090355317c287886c0e81dfd304fa5bda99, and it should be used as the auth-token header value.

The default token lifetime is 100 years.

Getting a temporary token via the rest/token service

The second way to get the token is to use the rest module web service - token. You can get a token through an authenticated request to the address rest/token. More details.