# Functions
AttributeFromContext is a convenience method that returns the named attribute from the session, if available.
ContextWithSession returns a new context with session associated.
DefaultOnError is the default ErrorFunction implementation.
DefaultRequestTracker returns a new RequestTracker for the provided options, a CookieRequestTracker which uses cookies to track pending requests.
DefaultServiceProvider returns the default saml.ServiceProvider for the provided options.
DefaultSessionCodec returns the default SessionCodec for the provided options, a JWTSessionCodec configured to issue signed tokens.
DefaultSessionProvider returns the default SessionProvider for the provided options, a CookieSessionProvider configured to store sessions in a cookie.
DefaultTrackedRequestCodec returns a new TrackedRequestCodec for the provided options, a JWTTrackedRequestCodec that uses a JWT to encode TrackedRequests.
FetchMetadata returns metadata from an IDP metadata URL.
New creates a new Middleware with the default providers for the given options.
ParseMetadata parses arbitrary SAML IDP metadata.
RequireAttribute returns a middleware function that requires that the SAML attribute `name` be set to `value`.
SessionFromContext returns the session associated with ctx, or nil if no session are associated.
# Variables
ErrNoSession is the error returned when the remote user does not have a session.
# Structs
CookieRequestTracker tracks requests by setting a uniquely named cookie for each request.
CookieSessionProvider is an implementation of SessionProvider that stores session tokens in an HTTP cookie.
JWTSessionClaims represents the JWT claims in the encoded session.
JWTSessionCodec implements SessionCoded to encode and decode Sessions from the corresponding JWT.
JWTTrackedRequestClaims represents the JWT claims for a tracked request.
JWTTrackedRequestCodec encodes TrackedRequests as signed JWTs.
Middleware implements middleware than allows a web application to support SAML.
Options represents the parameters for creating a new middleware.
TrackedRequest holds the data we store for each pending request.
# Interfaces
RequestTracker tracks pending authentication requests.
Session is an interface implemented to contain a session.
SessionCodec is an interface to convert SAML assertions to a Session.
SessionProvider is an interface implemented by types that can track the active session of a user.
SessionWithAttributes is a session that can expose the attributes provided by the SAML identity provider.
TrackedRequestCodec handles encoding and decoding of a TrackedRequest.
# Type aliases
Attributes is a map of attributes provided in the SAML assertion.
ErrorFunction is a callback that is invoked to return an error to the web user.