Soenneker.Kiota.BearerAuthenticationProvider
4.0.50
Prefix Reserved
dotnet add package Soenneker.Kiota.BearerAuthenticationProvider --version 4.0.50
NuGet\Install-Package Soenneker.Kiota.BearerAuthenticationProvider -Version 4.0.50
<PackageReference Include="Soenneker.Kiota.BearerAuthenticationProvider" Version="4.0.50" />
<PackageVersion Include="Soenneker.Kiota.BearerAuthenticationProvider" Version="4.0.50" />
<PackageReference Include="Soenneker.Kiota.BearerAuthenticationProvider" />
paket add Soenneker.Kiota.BearerAuthenticationProvider --version 4.0.50
#r "nuget: Soenneker.Kiota.BearerAuthenticationProvider, 4.0.50"
#:package Soenneker.Kiota.BearerAuthenticationProvider@4.0.50
#addin nuget:?package=Soenneker.Kiota.BearerAuthenticationProvider&version=4.0.50
#tool nuget:?package=Soenneker.Kiota.BearerAuthenticationProvider&version=4.0.50
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Kiota.Abstractions (>= 2.1.2)
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 |
|---|---|---|
| 4.0.50 | 1,139 | 9/8/2026 |
| 4.0.49 | 3,009 | 9/4/2026 |
| 4.0.48 | 1,543 | 9/3/2026 |
| 4.0.47 | 272 | 8/30/2026 |
| 4.0.46 | 6,740 | 8/29/2026 |
| 4.0.45 | 1,072 | 8/29/2026 |
| 4.0.44 | 87,215 | 7/28/2026 |
| 4.0.43 | 36,032 | 7/16/2026 |
| 4.0.42 | 47,120 | 6/18/2026 |
| 4.0.41 | 43,637 | 6/5/2026 |
| 4.0.40 | 128 | 6/5/2026 |
| 4.0.39 | 41,634 | 5/7/2026 |
| 4.0.38 | 1,179 | 5/6/2026 |
| 4.0.37 | 29,643 | 4/22/2026 |
| 4.0.36 | 49,373 | 3/19/2026 |
| 4.0.35 | 14,211 | 3/12/2026 |
| 4.0.34 | 694 | 3/12/2026 |
| 4.0.32 | 1,599 | 3/12/2026 |
| 4.0.31 | 14,982 | 3/10/2026 |
| 4.0.30 | 4,830 | 3/9/2026 |
Update dependency Microsoft.Kiota.Abstractions to 2.1.2 (#605)