-
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 device code, interactive, and user credentials #4585
Conversation
sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
...azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredential.java
Outdated
Show resolved
Hide resolved
...dentity/azure-identity/src/main/java/com/azure/identity/credential/DeviceCodeCredential.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UserCredential.java
Outdated
Show resolved
Hide resolved
...zure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java
Outdated
Show resolved
Hide resolved
...zure-identity/src/main/java/com/azure/identity/implementation/AuthorizationCodeListener.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
try { | ||
SilentParameters parameters; | ||
if (currentApplication.get() != null) { | ||
if (currentAccount.get() != null) { |
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.
If currentAccount is null how are you getting a token silently? What account are you getting a token for in this case?
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.
the IAccount argument is optional in MSAL - thus try calling that if the account is not available
sdk/identity/azure-identity/src/main/java/com/azure/identity/IdentityClient.java
Outdated
Show resolved
Hide resolved
...azure-identity/src/main/java/com/azure/identity/credential/InteractiveBrowserCredential.java
Outdated
Show resolved
Hide resolved
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.
Looks good.
sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java
Outdated
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeChallenge.java
Show resolved
Hide resolved
...ity/azure-identity/src/main/java/com/azure/identity/credential/AadCredentialBuilderBase.java
Outdated
Show resolved
Hide resolved
...zure-identity/src/main/java/com/azure/identity/credential/ChainedTokenCredentialBuilder.java
Outdated
Show resolved
Hide resolved
.../azure-identity/src/main/java/com/azure/identity/credential/ClientCertificateCredential.java
Outdated
Show resolved
Hide resolved
...identity/src/main/java/com/azure/identity/credential/ClientCertificateCredentialBuilder.java
Outdated
Show resolved
Hide resolved
...identity/src/main/java/com/azure/identity/credential/ClientCertificateCredentialBuilder.java
Outdated
Show resolved
Hide resolved
...entity/azure-identity/src/main/java/com/azure/identity/credential/CredentialBuilderBase.java
Outdated
Show resolved
Hide resolved
...zure-identity/src/main/java/com/azure/identity/credential/ClientSecretCredentialBuilder.java
Show resolved
Hide resolved
sdk/identity/azure-identity/src/main/java/com/azure/identity/implementation/IdentityClient.java
Outdated
Show resolved
Hide resolved
...entity/azure-identity/src/main/java/com/azure/identity/credential/CredentialBuilderBase.java
Outdated
Show resolved
Hide resolved
...ity/azure-identity/src/main/java/com/azure/identity/credential/AadCredentialBuilderBase.java
Show resolved
Hide resolved
* The identity client that contains APIs to retrieve access tokens | ||
* from various configurations. | ||
*/ | ||
public class IdentityClient { |
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 class should not be public
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 is in the implementation package - so credentials outside the package cannot see it unless it's public. But since it's in implementation package, no javadocs will be generated for it and Java devs know they shouldn't use it.
* | ||
* @see IdentityClient | ||
*/ | ||
public final class IdentityClientBuilder { |
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 class shouldn't be public
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.
Same as IdentityClient.
sdk/identity/azure-identity/src/main/java/com/azure/identity/credential/UserCredential.java
Outdated
Show resolved
Hide resolved
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.
Jonathan approved over Teams. |
* latest network * Replace adal with msal and support device code and interactive * Add device code & interactive credentials * Add user credential * Up versions for azure-identity * Wire up MSAL's token cache * Add mock tests * Device code and interactive unit tests * Some cr feedback * Add builders for credentials * Temporarily fix dependency versions * Add IdentityClientBuilder and some clean up * Add missed files * Add more identity client tests * Use logAndThrow * Update DefaultAzureCredential references in key vault * More key vault references * Code clean up * Work around jdk 9 issue * Work around JDK 9 time accuracy * Add core to identity pom.service.xml * Move tenantId and authorityHost builder methods * Fix MSI test flakiness * Add more docs in readme * User cred improvements, docs, samples * Add table of contents in readme
No description provided.