Skip to content

Commit

Permalink
[Identity] Update static token sample to use DelegatedTokenCredential (
Browse files Browse the repository at this point in the history
  • Loading branch information
schaabs authored Apr 25, 2022
1 parent ce611a6 commit cb97232
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ The following example shows an how an application already using some other mecha

```C# Snippet:TokenCredentialCreateUsage
AccessToken token = GetTokenForScope("https://storage.azure.com/.default");
var credential = TokenCredential.Create((_, _) => token);

var credential = DelegatedTokenCredential.Create((_, _) => token);

var client = new BlobClient(new Uri("https://aka.ms/bloburl"), credential);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ public void TokenCredentialCreateUsage()
{
#region Snippet:TokenCredentialCreateUsage
AccessToken token = GetTokenForScope("https://storage.azure.com/.default");
#if SNIPPET
var credential = TokenCredential.Create((_, _) => token);

var credential = DelegatedTokenCredential.Create((_, _) => token);

var client = new BlobClient(new Uri("https://aka.ms/bloburl"), credential);
#endif
#endregion
}

Expand Down

0 comments on commit cb97232

Please sign in to comment.