Soenneker.Kiota.BearerAuthenticationProvider
11.0.69
Prefix Reserved
dotnet add package Soenneker.Kiota.BearerAuthenticationProvider --version 11.0.69
NuGet\Install-Package Soenneker.Kiota.BearerAuthenticationProvider -Version 11.0.69
<PackageReference Include="Soenneker.Kiota.BearerAuthenticationProvider" Version="11.0.69" />
<PackageVersion Include="Soenneker.Kiota.BearerAuthenticationProvider" Version="11.0.69" />
<PackageReference Include="Soenneker.Kiota.BearerAuthenticationProvider" />
paket add Soenneker.Kiota.BearerAuthenticationProvider --version 11.0.69
#r "nuget: Soenneker.Kiota.BearerAuthenticationProvider, 11.0.69"
#:package Soenneker.Kiota.BearerAuthenticationProvider@11.0.69
#addin nuget:?package=Soenneker.Kiota.BearerAuthenticationProvider&version=11.0.69
#tool nuget:?package=Soenneker.Kiota.BearerAuthenticationProvider&version=11.0.69
Soenneker.Kiota.BearerAuthenticationProvider
A host-restricted Kiota authentication provider for static bearer tokens.
Install
dotnet add package Soenneker.Kiota.BearerAuthenticationProvider
Usage
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.Kiota.BearerAuthenticationProvider;
var authentication = new BearerAuthenticationProvider(
accessToken,
"api.example.com");
var adapter = new HttpClientRequestAdapter(
authentication,
httpClient: httpClient);
Supply host names without a scheme or path. The multiple-host constructor accepts an IEnumerable<string>.
The provider replaces Authorization with Bearer <token> only when the final request URI uses HTTPS and its host is allowed. It removes an existing authorization header when the URI is not allowed, preventing a reused RequestInformation or Kiota raw-URL request from carrying the token to another host.
Plain HTTP is rejected by default. allowInsecureHttp: true exists for controlled local development only. This provider stores one static token; create a new provider when it changes, or use a Kiota access-token provider for refreshable OAuth credentials.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.Kiota.Abstractions (>= 2.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Kiota.BearerAuthenticationProvider:
| Package | Downloads |
|---|---|
|
Soenneker.Cloudflare.Utils.Client
Thread-safe caching and configuration for generated Cloudflare OpenAPI clients. |
|
|
Soenneker.X.ClientUtil
Provides a cached X OpenAPI client authenticated with a configured bearer token. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.69 | 458 | 11/18/2026 |
| 11.0.68 | 791 | 11/17/2026 |
| 11.0.67 | 4,424 | 11/11/2026 |
| 11.0.66 | 3,984 | 11/3/2026 |
| 11.0.65 | 4,702 | 10/27/2026 |
| 11.0.64 | 884 | 10/26/2026 |
| 11.0.63 | 206 | 10/26/2026 |
| 4.0.62 | 3,651 | 10/14/2026 |
| 4.0.61 | 389 | 10/14/2026 |
| 4.0.56 | 660 | 10/12/2026 |
| 4.0.55 | 214 | 10/12/2026 |
| 4.0.54 | 1,592 | 10/11/2026 |
| 4.0.53 | 6,336 | 9/24/2026 |
| 4.0.52 | 1,940 | 9/15/2026 |
| 4.0.51 | 2,894 | 9/12/2026 |
| 4.0.50 | 2,124 | 9/8/2026 |
| 4.0.49 | 3,293 | 9/4/2026 |
| 4.0.48 | 1,581 | 9/3/2026 |
| 4.0.47 | 300 | 8/30/2026 |
| 4.0.46 | 6,768 | 8/29/2026 |
Updated NuGet packages