Rystem.Api.Client.Authentication.BlazorServer 6.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.Api.Client.Authentication.BlazorServer --version 6.2.0                
NuGet\Install-Package Rystem.Api.Client.Authentication.BlazorServer -Version 6.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rystem.Api.Client.Authentication.BlazorServer" Version="6.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rystem.Api.Client.Authentication.BlazorServer --version 6.2.0                
#r "nuget: Rystem.Api.Client.Authentication.BlazorServer, 6.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rystem.Api.Client.Authentication.BlazorServer as a Cake Addin
#addin nuget:?package=Rystem.Api.Client.Authentication.BlazorServer&version=6.2.0

// Install Rystem.Api.Client.Authentication.BlazorServer as a Cake Tool
#tool nuget:?package=Rystem.Api.Client.Authentication.BlazorServer&version=6.2.0                

What is Rystem?

Services extensions

HttpClient to use your API (example)

You can add a client for a specific url

builder.Services.AddRepository<User, string>(builder =>
{
    builder
        .WithApiClient()
        .WithHttpClient("localhost:7058");
});

Default interceptor for Authentication with JWT

You may use the default interceptor to deal with the identity manager in .Net DI.

builder.Services.AddDefaultAuthorizationInterceptorForApiHttpClient();

This line of code inject an interceptor that works with ITokenAcquisition, injected by the framework during OpenId integration (for example AAD integration). Automatically it adds the token to each request.

You may use the default identity interceptor not on all repositories, you can specificy them with

builder.Services.AddRepository(builder => {
    builder
        .WithApiClient()
        .WithHttpClient("localhost:7058")
        .AddDefaultAuthorizationInterceptorForApiHttpClient<T, TKey>();
});

Remember to add

builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAdB2C or AzureAd"))
 .EnableTokenAcquisitionToCallDownstreamApi(new string[] { "your_scope/access_as_user" })
 .AddInMemoryTokenCaches();

builder.Services.AddServerSideBlazor()
.AddMicrosoftIdentityConsentHandler();

builder.Services.AddControllersWithViews()
.AddMicrosoftIdentityUI();
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.3 32 12/22/2024
9.0.2 2,750 12/21/2024
9.0.1 1,062 12/21/2024
9.0.0 172,899 11/16/2024
9.0.0-rc.1 81 10/18/2024
6.2.0 218,955 10/10/2024
6.1.1 96 10/9/2024
6.1.0 47,871 9/29/2024
6.0.24 132 9/11/2024
6.0.23 340,032 7/18/2024
6.0.21 117 6/18/2024
6.0.20 727,703 6/16/2024
6.0.19 30,360 6/14/2024
6.0.18 102 6/14/2024
6.0.17 123 6/14/2024
6.0.16 49,953 6/10/2024
6.0.15 107 6/9/2024
6.0.14 94,258 5/24/2024
6.0.13 125 5/23/2024
6.0.12 110 5/23/2024
6.0.11 120 5/20/2024
6.0.9 141 5/20/2024
6.0.7 119 5/18/2024
6.0.6 103 5/13/2024
6.0.5 82 5/10/2024
6.0.4 549,684 4/3/2024
6.0.3 115 3/25/2024
6.0.2 393,350 3/11/2024
6.0.0 1,170,109 11/21/2023
6.0.0-rc.6 109 10/25/2023
6.0.0-rc.5 85 10/25/2023
6.0.0-rc.4 75 10/23/2023
6.0.0-rc.3 73 10/19/2023
6.0.0-rc.2 78 10/18/2023