From 054cdae8a01e5a1e18f274d25674e5195b8c37dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 25 Jul 2026 06:18:57 +0000 Subject: [PATCH 1/2] fix(Auth0): implement new token grant methods Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com> --- .../AuthenticationApiClientCachingDecorator.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs b/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs index 972215c93..dcabb4ac2 100644 --- a/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs +++ b/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs @@ -183,6 +183,16 @@ public Task GetTokenAsync(RefreshTokenRequest request, Canc return _getToken(request, _getKey, _inner.GetTokenAsync, cancellationToken); } + public async Task GetTokenAsync(TokenExchangeTokenRequest request, CancellationToken cancellationToken = default) + { + return await _inner.GetTokenAsync(request, cancellationToken).ConfigureAwait(false); + } + + public async Task GetTokenAsync(FederatedConnectionAccessTokenRequest request, CancellationToken cancellationToken = default) + { + return await _inner.GetTokenAsync(request, cancellationToken).ConfigureAwait(false); + } + private static string _getKey(RefreshTokenRequest r) { return $"RefreshTokenRequest{r.ClientId}{r.RefreshToken}{r.Audience}{r.Scope}"; From 2a230d2d84620aee420ac27a89188ad04b36a5af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 25 Jul 2026 06:27:07 +0000 Subject: [PATCH 2/2] docs(Auth0): document token grant methods Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com> --- .../AuthenticationApiClientCachingDecorator.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs b/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs index dcabb4ac2..f57abb468 100644 --- a/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs +++ b/src/common/Ark.Tools.Auth0/AuthenticationApiClientCachingDecorator.cs @@ -183,11 +183,23 @@ public Task GetTokenAsync(RefreshTokenRequest request, Canc return _getToken(request, _getKey, _inner.GetTokenAsync, cancellationToken); } + /// + /// Exchanges a token using the OAuth 2.0 Token Exchange grant. + /// + /// The token exchange request. + /// The cancellation token to cancel the operation. + /// The requested access token response. public async Task GetTokenAsync(TokenExchangeTokenRequest request, CancellationToken cancellationToken = default) { return await _inner.GetTokenAsync(request, cancellationToken).ConfigureAwait(false); } + /// + /// Exchanges an Auth0 token for an access token issued by a federated connection. + /// + /// The federated connection access token request. + /// The cancellation token to cancel the operation. + /// The requested access token response. public async Task GetTokenAsync(FederatedConnectionAccessTokenRequest request, CancellationToken cancellationToken = default) { return await _inner.GetTokenAsync(request, cancellationToken).ConfigureAwait(false);