Skip to content

Commit

Permalink
update snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
erich-wang committed Oct 15, 2020
1 parent 10e905c commit f387316
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<PackageReference Update="Microsoft.CodeAnalysis" Version="2.3.0" />
<PackageReference Update="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20467.1" />
<PackageReference Update="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="4.5.1" />
<PackageReference Update="Microsoft.Identity.Client" Version="4.20.0" />
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.16.0" />
<PackageReference Update="Microsoft.Identity.Client" Version="4.20.1" />
<PackageReference Update="Microsoft.Identity.Client.Extensions.Msal" Version="2.16.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Update="Microsoft.NETCore.Platforms" Version="2.2.1" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public AuthenticationRequiredException(string message, Azure.Core.TokenRequestCo
public AuthenticationRequiredException(string message, Azure.Core.TokenRequestContext context, System.Exception innerException) : base (default(string)) { }
public Azure.Core.TokenRequestContext TokenRequestContext { get { throw null; } }
}
public partial class AuthenticationTokenRecord : Azure.Identity.AuthenticationRecord
{
internal AuthenticationTokenRecord() { }
public Azure.Core.AccessToken AccessToken { get { throw null; } set { } }
}
public partial class AuthorizationCodeCredential : Azure.Core.TokenCredential
{
protected AuthorizationCodeCredential() { }
Expand Down Expand Up @@ -221,6 +216,8 @@ public partial class SharedTokenCacheCredentialOptions : Azure.Identity.TokenCre
public SharedTokenCacheCredentialOptions() { }
public SharedTokenCacheCredentialOptions(Azure.Identity.TokenCache tokenCache) { }
public Azure.Identity.AuthenticationRecord AuthenticationRecord { get { throw null; } set { } }
public string ClientId { get { throw null; } set { } }
public bool EnableGuestTenantAuthentication { get { throw null; } set { } }
public string TenantId { get { throw null; } set { } }
public Azure.Identity.TokenCache TokenCache { get { throw null; } }
public string Username { get { throw null; } set { } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ As code uses the `SecretClient` in the above sample, the `InteractiveBrowserCred
For terminal clients without an available web browser, or clients with limited UI capabilities the `DeviceCodeCredential` provides the ability to authenticate any client using a device code. The next sample shows authenticating a `BlobClient` using the `DeviceCodeCredential`.

```C# Snippet:Identity_ClientSideUserAuthentication_SimpleDeviceCode
var credential = new DeviceCodeCredential((deviceCodeInfo, _) => { Console.WriteLine(deviceCodeInfo.Message); return Task.CompletedTask; });
var credential = new DeviceCodeCredential();

var client = new BlobClient(new Uri("https://myaccount.blob.core.windows.net/mycontainer/myblob"), credential);
```
Expand Down

0 comments on commit f387316

Please sign in to comment.