Sylin.Koan.Web.Auth
0.8.0
dotnet add package Sylin.Koan.Web.Auth --version 0.8.0
NuGet\Install-Package Sylin.Koan.Web.Auth -Version 0.8.0
<PackageReference Include="Sylin.Koan.Web.Auth" Version="0.8.0" />
<PackageVersion Include="Sylin.Koan.Web.Auth" Version="0.8.0" />
<PackageReference Include="Sylin.Koan.Web.Auth" />
paket add Sylin.Koan.Web.Auth --version 0.8.0
#r "nuget: Sylin.Koan.Web.Auth, 0.8.0"
#:package Sylin.Koan.Web.Auth@0.8.0
#addin nuget:?package=Sylin.Koan.Web.Auth&version=0.8.0
#tool nuget:?package=Sylin.Koan.Web.Auth&version=0.8.0
Sylin.Koan.Web.Auth
Authentication scaffolding and shared components for Koan Web.
- Target framework: net9.0
- License: Apache-2.0
Capabilities
- Multi-protocol auth (OIDC/OAuth2)
- Discovery and health integration
- Provider adapters shipped as separate modules
Install
dotnet add package Sylin.Koan.Web.Auth
Usage - quick notes
- Configure providers via typed Options; avoid inline endpoints.
- Use MVC controllers with attribute routing for auth callbacks.
Dev/testing tip
- When using Koan.Web.Auth.Connector.Test in Development, its userinfo may include
roles[],permissions[], andclaims{}. These are mapped into the cookie principal (roles → ClaimTypes.Role, permissions →Koan.permission, claims{} → 1:1) so you can exercise authorization flows end-to-end.
Sign-out (controller)
[ApiController]
[Route("auth")]
public sealed class SignOutController : ControllerBase
{
[HttpPost("signout")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> SignOutApp([FromForm] string? returnUrl)
{
await HttpContext.SignOutAsync();
// Validate returnUrl before redirecting
return LocalRedirect(string.IsNullOrEmpty(returnUrl) ? "/" : returnUrl);
}
}
See TECHNICAL.md for contracts and configuration.
References
- Decisions:
/docs/decisions/WEB-0043-auth-multi-protocol-oauth-oidc-saml.md,/docs/decisions/WEB-0044-web-auth-discovery-and-health.md,/docs/decisions/WEB-0045-auth-provider-adapters-separate-projects.md
| 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.AspNetCore.Authentication.OpenIdConnect (>= 10.0.0)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 0.8.0)
- Sylin.Koan.Web (>= 0.8.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Sylin.Koan.Web.Auth:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Web.Auth.Connector.Test
Test identity provider for Koan Web Auth: local login UI, token issuance for demos, and development-only wiring. |
|
|
Sylin.Koan.Web.Auth.Connector.Discord
Discord OAuth2 auth provider adapter for Koan.Web.Auth (self-registering defaults). |
|
|
Sylin.Koan.Web.Auth.Connector.Google
Google auth provider adapter for Koan.Web.Auth (self-registering defaults). |
|
|
Sylin.Koan.Web.Auth.Connector.Microsoft
Microsoft (Entra ID) auth provider adapter for Koan.Web.Auth (self-registering defaults). |
|
|
Sylin.Koan.Web.Auth.Services
Authentication service helpers for Koan Web: token exchange clients, caching bridges, and backend-to-backend auth flows. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0 | 165 | 5/16/2026 |
See release notes: https://github.com/sylin-labs/Koan-framework/releases