From 2dbc9daa7cbc72eb642da55b171e83d170f4fd28 Mon Sep 17 00:00:00 2001 From: Anton Bronnikov Date: Wed, 12 Jun 2024 22:27:23 +0300 Subject: [PATCH] review: add docs for access-token auth method --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 0208421..bb834da 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,21 @@ Depending on the API you want to use, you may set the ``endpoint`` to: This lookup mechanism makes it easy to overload credentials for a specific project or user. +### Access Token + +This authentication method is useful when short-lived credentials are necessary. +E.g. oauth2 [plugin](https://github.com/puppetlabs/vault-plugin-secrets-oauthapp) +for hashicorp vault can request an access token that would be used by OVH +terraform provider. Although this token, requested via data-source, would end up +stored in the terraform state-file, that would pose less risk since the token +validity would last for only 1 hour. + +Other applications are of course also possible. + +In order to use the access token with this wrapper either use +`ovh.NewAccessTokenClient` to create the client, or pass the token via +`OVH_ACCESS_TOKEN` environment variable to `ovh.NewDefaultClient`. + ### Application Key/Application Secret If you have completed successfully the __OAuth2__ part, you can continue to