Skip to content

Commit

Permalink
Add API key support to st2client
Browse files Browse the repository at this point in the history
  • Loading branch information
enykeev committed May 26, 2016
1 parent 7a42a57 commit c4a8f87
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ by passing ``--skip-config`` flag to the CLI as shown below:
Authentication and auth token caching
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you specify authentication credentials in the configuration file, the CLI
will try to use those credentials to authenticate and retrieve an auth token.
If you specify username and password as authentication credentials in the
configuration file, the CLI will try to use those credentials to authenticate and
retrieve an auth token.

This auth token is by default cached on the local filesystem (in the ``~/.st2/token``
file) and re-used for subsequent requests to the API service.
Expand All @@ -100,6 +101,14 @@ expired.
If you have manually deleted or revoked a token before the expiration you can
clear the cached token from by removing the ``~/.st2/token`` file.

Setting API key as authentication credentials in configuration file will result in
CLI using it as a primary method of authentication instead of auth token.

.. sourcecode: ini
[credentials]
api_key = ZDAwTQx...ZTI3ZQ
Using debug mode
----------------

Expand Down

0 comments on commit c4a8f87

Please sign in to comment.