Lyo.Authentication.Web.Components.Server
2.0.0
dotnet add package Lyo.Authentication.Web.Components.Server --version 2.0.0
NuGet\Install-Package Lyo.Authentication.Web.Components.Server -Version 2.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="Lyo.Authentication.Web.Components.Server" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.Authentication.Web.Components.Server" Version="2.0.0" />
<PackageReference Include="Lyo.Authentication.Web.Components.Server" />
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 Lyo.Authentication.Web.Components.Server --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lyo.Authentication.Web.Components.Server, 2.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 Lyo.Authentication.Web.Components.Server@2.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=Lyo.Authentication.Web.Components.Server&version=2.0.0
#tool nuget:?package=Lyo.Authentication.Web.Components.Server&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lyo.Authentication.Web.Components.Server
Blazor Server host adapter for Lyo.Authentication.Web.Components. Plugs the shared login / debug / profile pages into the BFF-cookie auth runtime in Lyo.Authentication.Client.
Examples
Register services
builder.Services.AddLyoAuthClient(builder.Configuration);
builder.Services.AddLyoAuthBlazorStateProvider();
builder.Services.AddLyoAuthWebComponents(builder.Configuration);
builder.Services.AddLyoAuthWebComponentsServer();
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.MapLyoAuthSignIn();
app.MapLyoAuthHandoffCallback();
app.MapLyoAuthSignOut();
Register services (2)
<Router AppAssembly="typeof(Program).Assembly"
AdditionalAssemblies="new[] { typeof(Lyo.Authentication.Web.Components.Pages.LoginPage).Assembly }">
What's inside
| Service | Role |
|---|---|
ServerAuthSignInLauncher |
Sign-in 302s through the consumer's /auth/sign-in/{provider} endpoint. Sign-out submits a POST to /auth/sign-out via a dynamically constructed form (CSRF-safe). |
ServerAuthSessionAccessor |
Unseals the HttpOnly session cookie via IDataProtectionProvider, reads the active LyoAuthSession from LyoAuthSessionStore, and rotates it through /auth/refresh for the debug page's "Refresh token" button. |
ServerAuthUserClient |
Typed HttpClient with AddLyoAuthHandler() so calls to GET /auth/me and GET /auth/users/{id} carry the bearer and refresh on 401. |
Registration
Make sure the consuming Blazor Server router picks up this package's pages, either via auto-scan or by adding the assembly to AdditionalAssemblies:
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Authentication.Client(direct, lyo)Lyo.Authentication.Web.Components(direct, lyo)Lyo.Common.Core(direct, lyo)Lyo.Api.Client(transitive, lyo)Lyo.Api.Models(transitive, lyo)Lyo.Authentication.Models(transitive, lyo)Lyo.Common.Json(transitive, lyo)Lyo.Common.Metadata(transitive, lyo)Lyo.Configuration(transitive, lyo)Lyo.DataTable.Models(transitive, lyo)Lyo.DateAndTime(transitive, lyo)Lyo.Diagnostic(transitive, lyo)Lyo.Diagnostic.AspNetCore(transitive, lyo)Lyo.Encryption(transitive, lyo)Lyo.Exceptions(transitive, lyo)Lyo.Hashing(transitive, lyo)Lyo.Http.Client(transitive, lyo)Lyo.IO.Temp(transitive, lyo)Lyo.KeyStore(transitive, lyo)Lyo.Metrics(transitive, lyo)Lyo.PackageMetadata(transitive, lyo)Lyo.Parameters(transitive, lyo)Lyo.Query.Evaluation(transitive, lyo)Lyo.Query.Models(transitive, lyo)Lyo.Result(transitive, lyo)Lyo.Streams(transitive, lyo)Lyo.Validation(transitive, lyo)Lyo.Validation.Models(transitive, lyo)Lyo.Web.Components(transitive, lyo)Lyo.Web.Components.Export(transitive, lyo)Lyo.Web.Components.Export.Csv(transitive, lyo)Lyo.Web.Components.Export.Xlsx(transitive, lyo)Lyo.Web.Primitives(transitive, lyo)AngleSharp1.5.0(transitive, third-party)Blazored.LocalStorage4.5.0(transitive, third-party)BouncyCastle.Cryptography2.6.2(transitive, third-party, netstandard2.0)Konscious.Security.Cryptography.Argon21.3.1(transitive, third-party)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)Microsoft.Extensions.Configuration.Binder10.0.5(transitive, microsoft)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5(transitive, microsoft, net10.0, netstandard2.0)Microsoft.Extensions.Hosting.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Http10.0.5(transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5(transitive, microsoft)MudBlazor9.3(transitive, third-party)System.Buffers4.6.1(transitive, microsoft, netstandard2.0)System.ComponentModel.Annotations5.0.0(transitive, microsoft)System.IO.Hashing10.0.5(transitive, microsoft, net10.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Json10.0.5(transitive, microsoft, netstandard2.0)System.Threading.RateLimiting10.0.5(transitive, microsoft)System.Threading.Tasks.Extensions4.6.3(transitive, microsoft, netstandard2.0)
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Lyo.Authentication.Client (>= 2.0.0)
- Lyo.Authentication.Web.Components (>= 2.0.0)
- Lyo.Common.Core (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.