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

[Identity] Added default console output for DeviceCodeCredential #15266

Merged
merged 3 commits into from
Sep 23, 2020

Conversation

schaabs
Copy link
Member

@schaabs schaabs commented Sep 18, 2020

Adding support for printing device code message to console when no deviceCodeCallback is specified.

Fixes #13689

@@ -76,7 +87,7 @@ internal DeviceCodeCredential(Func<DeviceCodeInfo, CancellationToken, Task> devi

internal DeviceCodeCredential(Func<DeviceCodeInfo, CancellationToken, Task> deviceCodeCallback, string tenantId, string clientId, TokenCredentialOptions options, CredentialPipeline pipeline, MsalPublicClient client)
{
_clientId = clientId ?? throw new ArgumentNullException(nameof(clientId));
_clientId = clientId ?? Constants.DeveloperSignOnClientId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -95,6 +96,41 @@ public async Task AuthenticateWithDeviceCodeMockAsync2()
Assert.AreEqual(token.Token, expectedToken);
}

[Test]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this test [NonParallelizable]?

@schaabs schaabs merged commit bb36b69 into Azure:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Use Console" Option to DeviceCodeCredential
3 participants