From 8c9982d160ec4806c796ee2621b1811232ea59c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Socha?= <31014760+lukaszsocha2@users.noreply.github.com> Date: Mon, 13 Mar 2023 17:40:46 +0100 Subject: [PATCH] fix: Use fixed value of `aud` field in `JWT` claim (#896) Closes: SDK-3020 --- Box.V2/JWTAuth/BoxJWTAuth.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Box.V2/JWTAuth/BoxJWTAuth.cs b/Box.V2/JWTAuth/BoxJWTAuth.cs index 19982ba6c..0c1309824 100644 --- a/Box.V2/JWTAuth/BoxJWTAuth.cs +++ b/Box.V2/JWTAuth/BoxJWTAuth.cs @@ -106,7 +106,7 @@ public BoxJWTAuth(IBoxConfig boxConfig, IBoxService boxService) /// Config contains information about client id, client secret, enterprise id, private key, private key password, public key id /// Box service is used to perform GetToken requests /// Retry strategy used when retrying http request - /// + /// public BoxJWTAuth(IBoxConfig boxConfig, IBoxService boxService, IRetryStrategy retryStrategy) : this(boxConfig, boxService) { _retryStrategy = retryStrategy; @@ -265,7 +265,7 @@ private string ConstructJWTAssertion(string sub, string boxSubType, DateTimeOffs expireTime = nowOverride.Value.AddSeconds(30); } - var payload = new JwtPayload(_boxConfig.ClientId, new Uri(_boxConfig.BoxApiHostUri, Constants.AuthTokenEndpointString).ToString(), + var payload = new JwtPayload(_boxConfig.ClientId, new Uri(Constants.BoxAuthTokenApiUriString).ToString(), claims, null, expireTime.LocalDateTime); var header = new JwtHeader(signingCredentials: _credentials);