-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add support for AuthFileCredential #7552
Conversation
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/test/java/com/azure/identity/AuthFileCredentialTests.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java
Outdated
Show resolved
Hide resolved
import org.powermock.core.classloader.annotations.PowerMockIgnore; | ||
import org.powermock.core.classloader.annotations.PrepareForTest; | ||
import org.powermock.modules.junit4.PowerMockRunner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try using Mockito and avoid PowerMockito.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be deferred as discussed.
sdk/identity/azure-identity/src/test/java/com/azure/identity/AuthFileCredentialTests.java
Outdated
Show resolved
Hide resolved
void ensureCredential() { | ||
if (credential == null) { | ||
try { | ||
credential = BuildCredentialForCredentialsFile(ParseCredentialsFile(filepath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard this creation of credential in a multi-threaded environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credential is instance field and method credential.gettoken doesn't change the state of credential,so we don't think it is necessary to take care the multi-threaded environment
sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthFileCredential.java
Outdated
Show resolved
Hide resolved
@g2vinay - Can you help us get this approved for April release? |
This is on hold for further discussion. |
Added AuthFileCredential and its tests to azure-identity.
Azure/azure-sdk-for-net#9312