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

[Backport] TokenCredential class shouldn't be required (2441) #2453

Merged
merged 1 commit into from
Jun 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import javax.crypto.spec.SecretKeySpec;

import com.azure.core.credential.AccessToken;
import com.azure.core.credential.TokenCredential;
import com.azure.core.credential.TokenRequestContext;
import com.azure.identity.ManagedIdentityCredential;
import com.azure.identity.ManagedIdentityCredentialBuilder;
Expand Down Expand Up @@ -487,7 +486,7 @@ private static String[] getAdditonallyAllowedTenants() {
return null;
}

private static TokenCredential getCredentialFromCache(String key) {
private static Object getCredentialFromCache(String key) {
Credential credential = CREDENTIAL_CACHE.get(key);

if (null != credential) {
Expand All @@ -498,9 +497,9 @@ private static TokenCredential getCredentialFromCache(String key) {
}

private static class Credential {
TokenCredential tokenCredential;
Object tokenCredential;

public Credential(TokenCredential tokenCredential) {
public Credential(Object tokenCredential) {
this.tokenCredential = tokenCredential;
}
}
Expand Down