Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Note

...

Since 5.8.1 application tokens can be defined in translate5 and MUST be used for API usage.

Per user multiple Multiple tokens can be generated per each user.

Creation of the token in the UI

Your user must have the systemadmin or api role in order to get the APP token page.

Go to the App-Token administration (1) and (2) then add a new token (3) and follow the instructions.

Image Added

Creation of the token on CLI

The creation is currently only possible over the Command Line interface - a UI implementation will probably follow. For the usage of the CLI tools see the corresponding documentation.

Code Block
languagebash
titlereplace LOGIN and DESCRIPTION with appropriate values
./translate5.sh auth:apptoken:add LOGIN "DESCRIPTION"

See further documentation of the command see: ./translate5.sh auth:apptoken:add

Warning

The token is shown only once

...

! You have to copy it from where it is shown and store it where ever you want to use it!

Since it is stored encrypted in the

...

See ./translate5.sh auth:apptoken:add

translate5 DB it can not be retrieved anymore from translate5 again.


Usage of the token

...

The token can either be used as:

  1. on

...

  1. session API endpoint login as password - instead of the normal password
  2. As HTTP Header "Translate5AuthToken"
    • Each request with such header is authenticated - but gets a separate session
    • For persist / keep session, just take the ZfExtended Cookie from the first call with the token and use that in further requests instead of the token itself
    • or use the first option, the session API endpoint login and get the session id from there

Administration

A ./translate5.sh auth:apptoken:list to show all tokens (the description only) for a user is planned, also a ./translate5.sh auth:apptoken:delete.

...