aboutsummaryrefslogtreecommitdiff
path: root/secrets
diff options
context:
space:
mode:
Diffstat (limited to 'secrets')
-rw-r--r--secrets/vault_client.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/secrets/vault_client.go b/secrets/vault_client.go
index 3466f48..ce26dbe 100644
--- a/secrets/vault_client.go
+++ b/secrets/vault_client.go
@@ -222,6 +222,14 @@ func (c *VaultClient) Authenticate(ctx context.Context) error {
222 } 222 }
223} 223}
224 224
225// VaultToken is not part of the official API but is exposed for
226// clients that need to gain access to this for some reason. There are
227// no compatibility guarantees with this method and it's use limits
228// portability.
229func (c *VaultClient) VaultToken() string {
230 return c.client.Token()
231}
232
225func (c *VaultClient) authToken(ctx context.Context) error { 233func (c *VaultClient) authToken(ctx context.Context) error {
226 if c.client.Token() == "" { 234 if c.client.Token() == "" {
227 return fmt.Errorf("Authenticate: unable to authenticate, neither token nor approle provided") 235 return fmt.Errorf("Authenticate: unable to authenticate, neither token nor approle provided")