public ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) { if (ledgerUri == null) { throw new ArgumentNullException(nameof(ledgerUri)); } if (credential == null) { throw new ArgumentNullException(nameof(credential)); } options ??= new ConfidentialLedgerClientOptions(); Pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, AuthorizationScopes)); this.ledgerUri = ledgerUri; apiVersion = options.Version; }
public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) { if (identityServiceUri == null) { throw new ArgumentNullException(nameof(identityServiceUri)); } if (credential == null) { throw new ArgumentNullException(nameof(credential)); } options ??= new ConfidentialLedgerClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); var authPolicy = new BearerTokenAuthenticationPolicy(credential, AuthorizationScopes); Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.identityServiceUri = identityServiceUri; apiVersion = options.Version; }