Token Management

Every action in Lens AppIQ requires a token.

In order to create a team token, use the token create command.

$ lapps token create --id my-ci-token --team myteam \
    --description "CI token" --expires 48h

The expires flag is optional as by default, team tokens don’t expire.

With the token created, new permissions to this token can be set by using the role-assign command.

$ lapps role assign deployer my-ci-token

This example assumes that a role called deployer was previously created. A user can only add permissions that he owns himself.

A user can list all tokens assigned to his user id by using the token list command.

$ lapps token list
+-------------+--------+-------------+-------------------------+----------------------------------+----------------------------------------------------+-----------------+
| Token ID    | Team   | Description | Creator                 | Timestamps                       | Value                                              | Roles           |
+-------------+--------+-------------+-------------------------+----------------------------------+----------------------------------------------------+-----------------+
| my-ci-token | myteam | CI token    | [email protected]          |  Created At: 19 Sep 18 11:42 -03 | b3bc4ded93dd9a799874b564835d362aa1274be0e9511f29d↵ | deployer()      |
|             |        |             |                         |  Expires At: -                   | 3f78dc8517af176                                    |          |
|             |        |             |                         | Last Access: -                   |                                                    |          |
+-------------+--------+-------------+-------------------------+----------------------------------+----------------------------------------------------+-----------------+