Lyo.Authentication.Saml
3.0.0
dotnet add package Lyo.Authentication.Saml --version 3.0.0
NuGet\Install-Package Lyo.Authentication.Saml -Version 3.0.0
<PackageReference Include="Lyo.Authentication.Saml" Version="3.0.0" />
<PackageVersion Include="Lyo.Authentication.Saml" Version="3.0.0" />
<PackageReference Include="Lyo.Authentication.Saml" />
paket add Lyo.Authentication.Saml --version 3.0.0
#r "nuget: Lyo.Authentication.Saml, 3.0.0"
#:package Lyo.Authentication.Saml@3.0.0
#addin nuget:?package=Lyo.Authentication.Saml&version=3.0.0
#tool nuget:?package=Lyo.Authentication.Saml&version=3.0.0
Lyo.Authentication.Saml
SAML 2.0 service provider for Lyo.Authentication.Sso. Lyo is the service provider and still mints its own tokens after a successful login. There is no Lyo-as-IdP, no single
logout, and no signed AuthnRequest. Assertion encryption stays off.
Examples
Register the protocol
services.AddLyoSaml(builder.Configuration);
services.AddOktaProviderFromConfiguration(builder.Configuration);
services.AddEntraProviderFromConfiguration(builder.Configuration);
app.MapLyoAuthEndpoints();
Login
- The AuthnRequest is written with an XML writer. It carries
ID,IssueInstant,Issuer(the SP entity id),Destination(the metadataSingleSignOnServicewhose binding is HTTP-Redirect),AssertionConsumerServiceURL, andProtocolBindingof HTTP-POST. SAMLRequestis raw RFC 1951 DEFLATE, then standard base64, then URI-encoded. The POST body is base64 only and is never inflated.- SP-initiated login stores a single-use in-memory ticket and puts the ticket id in
RelayState. The id is at most 80 bytes. A POST with no matching ticket is rejected, which also drops IdP-initiated login. The ticket is removed on the first POST, including when validation later fails.
Assertion checks
EncryptedAssertionandEncryptedIDreject withSamlEncryptedbefore NameID or attributes are read.- Exactly one
Assertion. The signature reference must be that assertion'sID, or theResponseIDwhen the response signature covers it.GetIdElementreturns only that element. - Transforms are enveloped-signature plus exclusive canonicalization without comments. SHA-1, HMAC, inclusive canonicalization, XPath, and XSLT are rejected.
- Trust is byte or SHA-256 thumbprint equality with a metadata
KeyDescriptorwhoseuseissigningor omitted.use="encryption"is ignored.KeyInfoalone is not trust. - Status must be Success. Both issuers must equal the IdP
entityID.InResponseTomust equal the stored AuthnRequest id. Every audience restriction must contain the SP entity id. Destination and bearer recipient must equal the ACS URL. Transient NameIDs are rejected. EmailVerifiedis true only for the one email attribute the profile maps.
Metadata
Metadata fetch is HTTPS only, refuses a redirect to another host, and caps the body. Signing certificates are read from IDPSSODescriptor, not SPSSODescriptor. A failed fetch
does not replace the last good entry.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Authentication(direct, lyo)Lyo.Authentication.Sso(direct, lyo)Lyo.Common.Core(direct, lyo)Lyo.Exceptions(direct, lyo)Lyo.Api.Models(transitive, lyo)Lyo.Authentication.Models(transitive, lyo)Lyo.Common.Metadata(transitive, lyo)Lyo.DataTable.Models(transitive, lyo)Lyo.DateAndTime(transitive, lyo)Lyo.Hashing(transitive, lyo)Lyo.Json(transitive, lyo)Lyo.KeyStore(transitive, lyo)Lyo.Parameters(transitive, lyo)Lyo.Query.Models(transitive, lyo)Lyo.Result(transitive, lyo)BouncyCastle.Cryptography2.6.2(transitive, third-party)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.Options10.0.5(transitive, microsoft)System.IO.Hashing10.0.5(transitive, microsoft, net10.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Encoding.CodePages10.0.5(transitive, microsoft)System.Text.Json10.0.5(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. |
-
net10.0
- Lyo.Authentication (>= 3.0.0)
- Lyo.Authentication.Sso (>= 3.0.0)
- Lyo.Common.Core (>= 3.0.0)
- Lyo.Exceptions (>= 3.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lyo.Authentication.Saml:
| Package | Downloads |
|---|---|
|
Lyo.Authentication.Entra
Microsoft Entra SAML profile for Lyo.Authentication.Saml. Uses the app federation metadata URL with appid. Request verification and assertion encryption stay off. |
|
|
Lyo.Authentication.Okta
Okta SAML profile for Lyo.Authentication.Saml. Uses the public exk metadata URL. Request signing and assertion encryption stay off. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 83 | 10/23/2026 |