From 7ecde316b999835d5e4ff9512be8ffdd7375dd14 Mon Sep 17 00:00:00 2001 From: Roman Ackermann Date: Fri, 22 May 2020 17:06:34 +0200 Subject: [PATCH] Updated managed identity API to '2019-08-01' --- src/Client.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Client.php b/src/Client.php index 6ccf388..53a78d5 100644 --- a/src/Client.php +++ b/src/Client.php @@ -8,7 +8,7 @@ class Client { - const OAUTH_API_VERSION = '2017-09-01'; + const OAUTH_API_VERSION = '2019-08-01'; const VAULT_API_VERSION = '7.0'; /** @@ -33,12 +33,12 @@ public function __construct() { * @return string */ protected function getAccessToken() { - $endpoint = getenv('MSI_ENDPOINT'); - $secret = getenv('MSI_SECRET'); + $endpoint = getenv('IDENTITY_ENDPOINT'); + $idHeader = getenv('IDENTITY_HEADER'); $resource = 'https://vault.azure.net'; $endpoint = Url::fromString($endpoint)->withQueryParameter('resource', $resource); - return 'Bearer ' . $this->get($endpoint, $secret, 'secret', self::OAUTH_API_VERSION)->access_token; + return 'Bearer ' . $this->get($endpoint, $idHeader, 'X-IDENTITY-HEADER', self::OAUTH_API_VERSION)->access_token; } /**