Skip to content

Commit 3e85bc9

Browse files
authored
Support for refresh_in for ConfidentialClient (#542)
* Added support for force refresh_in * fixed failing test * updating storage * Updated the force refresh in * Updated test description * Updated test * Updated force refresh in Shifted RefreshOn in Metadata * Updated some tests * Updated time. * Cleaned up code reference with PR comments * Refactor code * Updated the refreshin system on per tenant base * Added test for force refresh once for each tenant * Update confidential_test.go * Update confidential_test.go * Update confidential_test.go * Refactor code * Update confidential_test.go * Updated some tests to adapt to change in time * Added RefreshIn logic for Managed Identity * Added a sync http client and updated tests * Updated the code * Added a time setting for refreshOn for MI * Updated the refreshon time when ests gives empry refreshon * Updated test to fail on first error * Refactored the channel for test * Resolve PR comments * updated code based on comments * Added a test to check the concurrent 2 tenant request * Updated concurrent test * Updating MockClient * Updated one concurrent test * Update confidential_test.go * Resolved the flaky test * Updating for the simpler check for refresh in * resolved comments
1 parent 2fbdd87 commit 3e85bc9

File tree

22 files changed

+726
-157
lines changed

22 files changed

+726
-157
lines changed

apps/confidential/confidential.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ func (cca Client) AcquireTokenByUsernamePassword(ctx context.Context, scopes []s
639639
if err != nil {
640640
return AuthResult{}, err
641641
}
642-
return cca.base.AuthResultFromToken(ctx, authParams, token, true)
642+
return cca.base.AuthResultFromToken(ctx, authParams, token)
643643
}
644644

645645
// acquireTokenByAuthCodeOptions contains the optional parameters used to acquire an access token using the authorization code flow.
@@ -733,7 +733,7 @@ func (cca Client) AcquireTokenByCredential(ctx context.Context, scopes []string,
733733
if err != nil {
734734
return AuthResult{}, err
735735
}
736-
return cca.base.AuthResultFromToken(ctx, authParams, token, true)
736+
return cca.base.AuthResultFromToken(ctx, authParams, token)
737737
}
738738

739739
// acquireTokenOnBehalfOfOptions contains optional configuration for AcquireTokenOnBehalfOf

0 commit comments

Comments
 (0)