public LineageRestClient(Uri endpoint, TokenCredential credential, CatalogClientOptions options = null)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException(nameof(endpoint));
            }
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            options ??= new CatalogClientOptions();
            Pipeline      = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, AuthorizationScopes));
            this.endpoint = endpoint;
            apiVersion    = options.Version;
        }
Exemple #2
0
        public DiscoveryRestClient(Uri endpoint, TokenCredential credential, CatalogClientOptions options = null)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException(nameof(endpoint));
            }
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            options ??= new CatalogClientOptions();
            _clientDiagnostics = new ClientDiagnostics(options);
            var authPolicy = new BearerTokenAuthenticationPolicy(credential, AuthorizationScopes);

            Pipeline      = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() });
            this.endpoint = endpoint;
            apiVersion    = options.Version;
        }