![]() |
VOOZH | about |
dotnet add package Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer --version 10.0.8
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer -Version 10.0.8
<PackageReference Include="Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer" Version="10.0.8" />
<PackageVersion Include="Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer" Version="10.0.8" />Directory.Packages.props
<PackageReference Include="Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer" />Project file
paket add Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer --version 10.0.8
#r "nuget: Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer, 10.0.8"
#:package Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer@10.0.8
#addin nuget:?package=Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer&version=10.0.8Install as a Cake Addin
#tool nuget:?package=Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer&version=10.0.8Install as a Cake Tool
Blazor Server authentication helpers for Rystem.RepositoryFramework.Api.Client.
This package plugs concrete token managers into the API client's interceptor pipeline so repository calls can automatically add bearer tokens in Blazor Server hosts.
dotnet add package Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer
The current package metadata in src/Repository/RepositoryFramework.Api.Client.Authentication.BlazorServer/RepositoryFramework.Api.Client.Authentication.BlazorServer.csproj is:
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer10.0.6net10.0Microsoft.Identity.Abstractions 11.0.0Rystem.Authentication.Social.Blazor| Area | Purpose |
|---|---|
TokenManager |
Microsoft Identity / MSAL path via IAuthorizationHeaderProvider |
SocialTokenManager |
Social-login path via SocialLoginManager |
| Convenience extensions | Register the right token manager into the base API-client interceptor pipeline |
Shared AuthenticatorSettings |
Reuse the settings model from Rystem.RepositoryFramework.Api.Client |
This package does not implement a new HTTP client. It only provides Blazor Server-specific token sources for the base repository API client.
The actual HTTP behavior still comes from Rystem.RepositoryFramework.Api.Client:
401 UnauthorizedThis package only decides how the bearer token is acquired.
This path is built on IAuthorizationHeaderProvider from Microsoft.Identity.Abstractions.
builder.Services
.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"))
.EnableTokenAcquisitionToCallDownstreamApi(["api://your-api-id/.default"])
.AddInMemoryTokenCaches();
builder.Services.AddDefaultAuthorizationInterceptorForApiHttpClient(settings =>
{
settings.Scopes = ["api://your-api-id/.default"];
});
builder.Services.AddRepository<Product, int>(repositoryBuilder =>
{
repositoryBuilder.WithApiClient(apiBuilder =>
{
apiBuilder.WithHttpClient("https://api.example.com");
});
});
TokenManager worksIAuthorizationHeaderProvider.CreateAuthorizationHeaderForUserAsync(...) for a full authorization header valueBearer {token}HttpClient.DefaultRequestHeaders.Authorizationnull and the request proceeds without an auth headerIn practice you should provide settings.Scopes for this path, because the underlying token-manager implementation passes _settings.Scopes! to CreateAuthorizationHeaderForUserAsync(...).
This path is built on SocialLoginManager from Rystem.Authentication.Social.Blazor.
builder.Services.AddDefaultSocialLoginAuthorizationInterceptorForApiHttpClient();
builder.Services.AddRepository<Product, int>(repositoryBuilder =>
{
repositoryBuilder.WithApiClient(apiBuilder =>
{
apiBuilder.WithHttpClient("https://api.example.com");
});
});
SocialTokenManager worksSocialLoginManager.FetchTokenAsync()Authorization: Bearer {accessToken}LogoutAsync()NavigationManager is available, it forces a page refresh so the login flow can restartThis makes the social-login path more aggressive than the MSAL path: missing auth state can immediately push the user back into a sign-in flow.
This package only exposes the social-login convenience method in its global form:
builder.Services.AddDefaultSocialLoginAuthorizationInterceptorForApiHttpClient();
There is no package-level convenience overload for model-only or model-plus-key-only social auth.
All convenience methods are registered on IServiceCollection.
| Method | Token source | Scope |
|---|---|---|
AddDefaultAuthorizationInterceptorForApiHttpClient(settings?) |
TokenManager |
all repository clients |
AddDefaultAuthorizationInterceptorForApiHttpClient<T>(settings?) |
TokenManager |
one model |
AddDefaultAuthorizationInterceptorForApiHttpClient<T, TKey>(settings?) |
TokenManager |
one model + key |
AddDefaultSocialLoginAuthorizationInterceptorForApiHttpClient(settings?) |
SocialTokenManager |
all repository clients |
AuthenticatorSettingsThis package reuses the shared settings model from the core API client package.
public class AuthenticatorSettings
{
public string[]? Scopes { get; set; }
public Func<Exception, IServiceProvider, Task>? ExceptionHandler { get; set; }
}
Scopes matters for the Microsoft Identity pathExceptionHandler is used by the base bearer interceptor when request-time token enrichment throwsThese helpers ultimately call the generic registration methods in Rystem.RepositoryFramework.Api.Client, so the same caveats still apply here:
That means automatic 401 refresh-and-retry is available for the global and model-specific registrations, but not fully for the model-plus-key registration path.
For the Microsoft Identity path, the token manager catches token-acquisition exceptions and returns null, so the outgoing request can continue without the bearer header.
For the social-login path, failure to fetch a token leads to logout plus optional forced navigation refresh.
builder.Services.AddDefaultAuthorizationInterceptorForApiHttpClient(settings =>
{
settings.Scopes = builder.Configuration["AzureAd:Scopes"]!.Split(' ');
});
builder.Services.AddDefaultAuthorizationInterceptorForApiHttpClient<Product>(settings =>
{
settings.Scopes = ["api://your-api-id/.default"];
});
builder.Services.AddDefaultSocialLoginAuthorizationInterceptorForApiHttpClient();
| Package | Purpose |
|---|---|
Rystem.RepositoryFramework.Api.Client |
Base repository HTTP client and interceptor pipeline |
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorWasm |
Equivalent auth helpers for Blazor WebAssembly |
Rystem.Authentication.Social.Blazor |
Social-login infrastructure used by SocialTokenManager |
Rystem.RepositoryFramework.Api.Server |
Matching server package |
Read this package after src/Repository/RepositoryFramework.Api.Client/README.md when your repository client runs in Blazor Server.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.8 | 5,513 | 5/13/2026 |
| 10.0.7 | 147 | 3/26/2026 |
| 10.0.6 | 433,455 | 3/3/2026 |
| 10.0.5 | 134 | 2/22/2026 |
| 10.0.4 | 138 | 2/9/2026 |
| 10.0.3 | 147,922 | 1/28/2026 |
| 10.0.1 | 209,099 | 11/12/2025 |
| 9.1.3 | 311 | 9/2/2025 |
| 9.1.2 | 764,496 | 5/29/2025 |
| 9.1.1 | 97,868 | 5/2/2025 |
| 9.0.32 | 186,759 | 4/15/2025 |
| 9.0.31 | 5,845 | 4/2/2025 |
| 9.0.30 | 88,811 | 3/26/2025 |
| 9.0.29 | 9,093 | 3/18/2025 |
| 9.0.28 | 282 | 3/17/2025 |
| 9.0.27 | 262 | 3/16/2025 |
| 9.0.26 | 331 | 3/13/2025 |
| 9.0.25 | 52,199 | 3/9/2025 |
| 9.0.21 | 382 | 3/6/2025 |
| 9.0.20 | 19,594 | 3/6/2025 |