Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use fixed value of aud field in JWT claim #896

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Box.V2/JWTAuth/BoxJWTAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public BoxJWTAuth(IBoxConfig boxConfig, IBoxService boxService)
/// <param name="boxConfig">Config contains information about client id, client secret, enterprise id, private key, private key password, public key id </param>
/// <param name="boxService">Box service is used to perform GetToken requests</param>
/// <param name="retryStrategy">Retry strategy used when retrying http request</param>
///
///
public BoxJWTAuth(IBoxConfig boxConfig, IBoxService boxService, IRetryStrategy retryStrategy) : this(boxConfig, boxService)
{
_retryStrategy = retryStrategy;
Expand Down Expand Up @@ -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);
Expand Down