Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.03 KB

File metadata and controls

18 lines (12 loc) · 1.03 KB

Use your credentials

Your service might have additional configuration which requires you to pass the authentication token in addition to the signature envelope.

Use DefaultAzureCredential to get your token:

TokenCredential credential = new DefaultAzureCredential();
string[] scopes = { "https://your.service.scope/.default" };
AccessToken accessToken = credential.GetToken(new TokenRequestContext(scopes), CancellationToken.None);
CodeTransparencyClient client = new(new Uri("https://<< service name >>.confidential-ledger.azure.com"), new AzureKeyCredential(accessToken.Token));

Once you construct the client instance the token will be sent in the Authorization header as Bearer <token>.