Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

Sustainsys.Saml2

SAML2 protocol support. Do not use directly, use the high level package for your platform.

Author Sustainsys
Version 2.11.0
Tags SAML2 authentication AspNet SAML SSO

Public Types

Sustainsys.​Saml2

Is this certificate for current or future use?
How is the certificate used?
Extension methods for claims.
Extension methods for Claims Identities
Helper methods for DateTime formatting.
Represents a federation known to this service provider.
Represents a known identity provider that this service provider can communicate with.
Interface for an adapter around the logging framework used on each platform.
Crypto description for a Managed implementation of SHA256 signatures.
How should we override the metadata publishing rules
Extensions for NameIdFormat enum.
Logger adapter that does nothing.
Simple default implementation of detection of browsers/devices not compatible with the SameSite=None cookie attribute. Based on https://docs.microsoft.com/en-us/aspnet/core/security/samesite?view=aspnetcore-3.1
Extension methods for Saml2Assertion
Claim type constants.
Extension methods for Saml2Condition
Extension methods for Saml2NameId
SAML2 namespace constants.
Extension methods for Saml2Statement
Extension methods for Saml2Subject
Service Certificate definition
Stored data for pending requests.
The level of trust that a certain piece of data comes with.
Extension methods and helpers for XmlDocument/XmlElement etc.

Sustainsys.​Saml2.​Configuration

Config collection of ArtifactResolutionElements.
Configuration of an artifact resolution service endpoint on an idp.
Collection of certificate elements.
Config element for the signing certificate.
Compatibility settings. Can be used to make Saml2 accept certain non-standard behaviour.
Compatibility settings. Can be used to make Saml2 accept certain non-standard behaviour.
Collection of items with two sources: configured and loaded dyanically. The dynamically loaded can reset while the configured are kept. metadata.
Contact person for a SAML2 entity.
Config collection of contacts.
Converts between string and EntityId, used by the configuration system to allow configuration properties of type EntityId.
Config collection of federations.
Configuration of a federation.
Config collection of IdentityProviderElements.
A thread safe wrapper around a dictionary for the identity providers.
Config element for the identity provider element.
struct IOptions
Root interface for the options objects, handling all configuration of Saml2.
Metadata configuration.
NamedId policy configuration element.
class Options
Options implementation for handling in memory options.
Information about the organization responsible for the entity.
Config for a requested element in the SPs metadata.
Collection of requested attributes that an SP wants in incoming assertions.
Configuration of RequestedAuthnContext in generated AuthnRequests.
Set of callbacks that can be used as extension points for various events.
Certificates used by the service provider for signing, decryption and TLS client certificates for artifact resolve.
Config element for the service certificate element.
Config collection of ServiceCertificateElements.
Signing behavior for requests.
Options for the service provider's behaviour; i.e. everything except the idp and federation list.
Config section for the module.

Sustainsys.​Saml2.​Exceptions

A SAML response was found, but could not be parsed due to formatting issues.
Exception thrown when an signature is not valid according to the SAML standard.
No saml response was found in the http request.
Base class for authentication services specific exceptions, that might require special handling for error reporting to the user.
A SAML2 Response failed validation.
A SAML2 Response failed InResponseTo validation because RelayState is lost, or an unsolicited response contains an InResponseTo
Extended exception containing information about the status and status message SAML response.

Sustainsys.​Saml2.​Internal

SymmetricAlgorithm decrypting implementation for http://www.w3.org/2009/xmlenc11#aes128-gcm. This is class is not a general implementation and can only do decryption.

Sustainsys.​Saml2.​Metadata

Metadata for an attribute consuming service.
An indexed entry with an optional default
A collection of indexed entries with support for getting the configured default entry
class KeyData
Extensions for Metadatabase.
Helper for loading SAML2 metadata
Specifies an attribute requested by the service provider.

Sustainsys.​Saml2.​Saml2P

Comparison setting for RequestedAuthnContext, see SAML2 Core spec 3.3.2.2.1.
Wraps a <see cref="T:System.Xml.XmlWriter" /> and generates a signature automatically when the envelope is written completely. By default the generated signature is inserted as the last element in the envelope. This can be modified by explicitly calling WriteSignature to indicate the location inside the envelope where the signature should be inserted.
Common properties of all Saml2 message implementations (both requests and responses). There is no corresponding definition in the SAML2 standard, so this is made up of the common fields of 3.2.2 Complex Type StatusResponseType (the base type for all responses) and of 3.2.1 Complex Type RequestAbstractType.
The NameId Format.
Artifact resolution request, corresponds to section 3.5.1 in SAML core specification.
A Saml2 ArtifactResponse message as specified in SAML2 Core 3.5.2.
An authentication request corresponding to section 3.4.1 in SAML Core specification.
The Saml2IdPEntry specifies a single identity provider trusted by the requester to authenticate the presenter
A Saml2 LogoutRequest message (SAML core spec 3.7.1)
A Saml2 Logout Response.
The NameId policy.
Somewhat ugly subclassing to be able to access some methods that are protected on Saml2SecurityTokenHandler. The public interface of Saml2SecurityTokenHandler expects the actual assertion to be signed, which is not always the case when using Saml2-P. The assertion can be embedded in a signed response. Or the signing could be handled at transport level.
Base class for saml requests, corresponds to section 3.2.1 in SAML Core specification.
Configuration of RequestedAuthnContext
Represents a SAML2 response according to 3.3.3. The class is immutable (to an external observer. Internal state is lazy initiated).
Saml2Scoping specifies a set of identity providers trusted by the requester to authenticate the presenter, as well as limitations and context related to proxying of the authentication request message to subsequent identity providers by the responder.
Saml2 Soap binding implementation.
Status codes, mapped against states in section 3.2.2.2 in the SAML2 spec.
Abstract Saml2 StatusResponseType class.

Sustainsys.​Saml2.​Selectors

Sustainsys.​Saml2.​Tokens

Sustainsys.​Saml2.​WebSso

Represents the assertion consumer service command behaviour. Instances of this class can be created directly or by using the factory method CommandFactory.GetCommand(CommandFactory.AcsCommandName).
Reimplementation of System.Web.HttpCacheability.
Factory to create the command objects thand handles the incoming http requests.
The results of a command.
The data of a http request that Saml2 needs to handle. A separate DTO is used to make the core library totally independent of the hosting environment.
struct ICommand
A command - corresponds to an action in Mvc.
Represents the logout command behaviour. Instances of this class can be created directly or by using the factory method CommandFactory.GetCommand(CommandFactory.LogoutCommandName).
Represents the service provider metadata command behaviour. Instances of this class can be created directly or by using the factory method CommandFactory.GetCommand(CommandFactory.MetadataCommandName).
Represents a missing command. Instances of this class are returned by CommandFactory.GetCommand(...) when the specified command name is not recognised.
Saml2 Artifact binding.
Abstract base for all Saml2Bindings that binds a message to a specific kind of transport.
Saml2 binding types.
The urls of Saml2 that are used in various messages.
Represents the sign in command behaviour. Instances of this class can be created directly or by using the factory method CommandFactory.GetCommand(CommandFactory.SignInCommandName).
The result of a Saml2Binding.UnBind.

Dependencies