Arc4u.OAuth2.Client 9.0.0

Prefix Reserved
dotnet add package Arc4u.OAuth2.Client --version 9.0.0
                    
NuGet\Install-Package Arc4u.OAuth2.Client -Version 9.0.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="Arc4u.OAuth2.Client" Version="9.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Arc4u.OAuth2.Client" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Arc4u.OAuth2.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Arc4u.OAuth2.Client --version 9.0.0
                    
#r "nuget: Arc4u.OAuth2.Client, 9.0.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.
#:package Arc4u.OAuth2.Client@9.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Arc4u.OAuth2.Client&version=9.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Arc4u.OAuth2.Client&version=9.0.0
                    
Install as a Cake Tool

Arc4u.OAuth2.Client

Builds the AppPrincipal of the user of a client application (desktop, mobile, Blazor) from the token of an Arc4u token provider, and provides the user name and password token provider.

Install

dotnet add package Arc4u.OAuth2.Client

Usage

// Transient (as its [Export] attribute registers it), not a singleton: the token providers are resolved, and signed out, from the scope the factory is created in.
builder.Services.AddTransient<IAppPrincipalFactory, AppPrincipalFactory>();

// Once the host is built: sign the user in and set the principal in the IApplicationContext.
var settings = host.Services.GetRequiredService<IOptionsMonitor<SimpleKeyValueSettings>>().Get("OidcClient");
var principal = await host.Services.GetRequiredService<IAppPrincipalFactory>().CreatePrincipalAsync(settings);

AppPrincipalFactory asks the token provider named by the ProviderId of the settings for a token, and builds the principal from its claims.

Documentation

Product 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Arc4u.OAuth2.Client:

Package Downloads
Arc4u.OAuth2.Blazor

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.0 67 11/10/2026
9.0.0-preview46 65 11/3/2026
9.0.0-preview45 67 11/2/2026
9.0.0-preview44 67 11/1/2026
9.0.0-preview43 64 11/1/2026
9.0.0-preview42 65 10/30/2026
9.0.0-preview41 67 10/30/2026
9.0.0-preview40 68 10/27/2026
9.0.0-preview39 64 10/24/2026
9.0.0-preview38 101 10/22/2026
9.0.0-preview37 552 8/11/2026
9.0.0-preview36 409 7/28/2026
9.0.0-preview35 103 7/27/2026
9.0.0-preview34 107 7/27/2026
9.0.0-preview33 107 6/15/2026
9.0.0-preview32 109 6/14/2026
9.0.0-preview31 115 5/20/2026
9.0.0-preview30 96 5/19/2026
9.0.0-preview29 96 5/15/2026
9.0.0-preview28 100 5/15/2026
Loading failed