saml

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package saml is the SAML 2.0 Service Provider orchestration layer sitting on top of github.com/crewjam/saml. It builds AuthnRequest URLs, publishes SP metadata, and validates an IdP's Response into a platform-neutral Assertion — and it closes the gaps crewjam/saml leaves open by design:

  • Assertion replay. crewjam validates NotBefore/NotOnOrAfter and the signature but keeps no record of which assertion IDs it has already accepted, so a captured SAMLResponse can be replayed for the rest of its ~5-minute validity window. Provider.ValidateResponse rejects a second presentation of the same assertion ID via a ReplayCache.
  • Multiple assertions. crewjam parses every Assertion/EncryptedAssertion element in a Response and returns the first one that validates, rather than requiring exactly one. A Response smuggling a second, differently-trusted assertion alongside a legitimate one is refused outright before crewjam ever sees it (see ErrTooManyAssertions).
  • Decompression bombs. Any code path in this package that inflates a DEFLATE-compressed, redirect-bound SAML message (see InflateLimited) enforces a hard byte cap instead of trusting the compressed stream.
  • An absent Destination. crewjam only requires the Destination attribute when the Response itself is signed or the attribute is present; omitting it on an otherwise-validly-signed-Assertion Response skips the check entirely. RequireDestination (on by default) closes that.

Scope

This package has no notion of a user, account, tenant, organization, or role. A validated Assertion carries a NameID, a session index, validity timestamps, and the raw attribute bag the IdP sent — nothing is resolved into an application identity. Deciding which attribute means "email", whether a given NameID format is acceptable, and how a NameID or attribute maps to an account are all policy decisions left entirely to the caller; three real deployments disagree about every one of them (see the package tests and the migration notes in the project history for specifics), and baking any one answer in here would make this package unusable by the other two.

Storage

The only state this package needs to keep is the replay cache, and that is an interface (ReplayCache). NewMemoryReplayCache provides a bounded, TTL-evicting in-memory implementation that is enough on its own for a single process; a caller that needs replay protection to survive a restart or to be shared across instances supplies their own ReplayCache backed by whatever store they already have (SQL, Redis, ...) — this package does not prescribe a schema.

No logging

This package never writes to a logger. Every rejection is a distinguishable sentinel error (see errors.go) with enough context attached (via %w and exported fields) for the caller to log it however their own project does.

Index

Constants

View Source
const (
	// DefaultMaxResponseBytes caps the decoded (POST-binding) or inflated
	// (redirect-binding) SAML Response XML this package will parse.
	// Real-world responses, even with a dozen attributes and a full
	// certificate chain in the signature, are well under 100KB.
	DefaultMaxResponseBytes = 1 << 20 // 1 MiB

	// DefaultMaxInflatedBytes caps the OUTPUT of DEFLATE decompression
	// for a redirect-bound message, independent of DefaultMaxResponseBytes
	// (which applies to the XML after decompression too). It exists
	// specifically to defend against a decompression bomb: a tiny
	// compressed payload that expands to gigabytes.
	DefaultMaxInflatedBytes = 1 << 20 // 1 MiB

	// DefaultReplayCacheCapacity bounds the in-memory replay cache's
	// entry count so a flood of distinct assertion IDs cannot grow it
	// without limit.
	DefaultReplayCacheCapacity = 65536

	// DefaultReplayExpiryMargin is added on top of an assertion's
	// NotOnOrAfter (plus crewjam's own MaxClockSkew) when computing how
	// long its ID must be remembered. The margin exists so that even a
	// process with a somewhat-behind clock, or a caller that validates
	// slightly late, still closes the full window crewjam would accept
	// a replay in.
	DefaultReplayExpiryMargin = time.Minute
)

Default tuning values, used when the corresponding Config field is left at its zero value. They are conservative enough for a normal deployment (a handful of IdPs, assertions on the order of a few KB) while still bounding worst-case memory use against a hostile or misconfigured IdP.

Variables

View Source
var (
	// ErrNotConfigured is returned by any Provider method when New failed
	// to build a usable crewjam ServiceProvider (e.g. IDPMetadata was nil).
	ErrNotConfigured = errors.New("saml: provider not configured")

	// ErrMissingAssertionID is returned when a validated assertion carries
	// no ID. SAML core (2.3.3) requires an Assertion to have an ID; an
	// empty one would silently bypass the replay cache, so it is treated
	// as a hard failure rather than a assertion the cache ignores.
	ErrMissingAssertionID = errors.New("saml: assertion has no ID")

	// ErrReplayed is returned when ValidateResponse(XML) sees an
	// assertion ID it has already accepted within its acceptance window.
	ErrReplayed = errors.New("saml: assertion already consumed (replay)")

	// ErrReplayCacheFull rejects a new assertion when all memory-cache records
	// are still valid. Existing records are never evicted to admit a new ID.
	ErrReplayCacheFull = errors.New("saml: replay cache capacity exhausted")

	// ErrTooManyAssertions is returned when a Response carries more than
	// one top-level Assertion/EncryptedAssertion element. crewjam/saml
	// silently picks the first assertion that parses and validates; on
	// its own that is a wrapping vector (GHSA-j2jp-wvqg-wc2g class:
	// smuggle a second, differently-trusted assertion alongside a
	// legitimate one). This package refuses the whole response instead.
	ErrTooManyAssertions = errors.New("saml: response contains more than one assertion")

	// ErrMissingDestination is returned when RequireDestination is true
	// (the default) and the Response has no Destination attribute.
	// crewjam only enforces Destination when the Response itself is
	// signed OR the attribute is present; an attacker can omit it on an
	// unsigned Response (still valid when only the Assertion is signed)
	// to skip the check entirely. This package closes that gap.
	ErrMissingDestination = errors.New("saml: response has no Destination")

	// ErrDestinationMismatch is returned when the Response's Destination
	// attribute does not equal this Provider's configured ACS URL.
	ErrDestinationMismatch = errors.New("saml: response Destination does not match the ACS URL")

	// ErrWeakSignatureAlgorithm is returned when RejectWeakSignatures is
	// true (the default) and the response declares a SignatureMethod or
	// DigestMethod outside the SHA-256-or-better allowlist (most notably
	// rsa-sha1, ADFS's and legacy Keycloak's historical default).
	ErrWeakSignatureAlgorithm = errors.New("saml: response uses a weak signature or digest algorithm")

	// ErrEncryptedAssertionNotAllowed is returned when the Response
	// carries an EncryptedAssertion and AllowEncryptedAssertions is
	// false (the default).
	ErrEncryptedAssertionNotAllowed = errors.New("saml: response contains an encrypted assertion, which is not allowed by this provider's configuration")

	// ErrDuplicateAttribute is returned when StrictAttributes is true and
	// the same attribute Name (or FriendlyName) is declared by more than
	// one distinct <Attribute> element in the assertion.
	ErrDuplicateAttribute = errors.New("saml: assertion declares the same attribute name more than once")

	// ErrResponseTooLarge is returned when the decoded response XML (or,
	// for a redirect-bound message, the inflated payload) exceeds the
	// configured size limit.
	ErrResponseTooLarge = errors.New("saml: response exceeds the maximum allowed size")

	// ErrMalformedResponse is returned when the response cannot be
	// interpreted as a single top-level SAML <Response> element at all
	// (not valid XML, empty, wrong root element, ...).
	ErrMalformedResponse = errors.New("saml: response is not a well-formed SAML Response")
)

Sentinel errors returned by this package. Callers can match them with errors.Is; the underlying crewjam/saml error (when there is one) is always wrapped so its detail is not lost.

Functions

func Bool

func Bool(b bool) *bool

Bool is a small helper for the *bool Config fields, so a caller can write Config{RequireDestination: saml.Bool(false)} instead of taking the address of a local variable.

func DecodeRedirectMessage

func DecodeRedirectMessage(raw string, maxBytes int64) ([]byte, error)

DecodeRedirectMessage base64-decodes and then safely inflates a SAML HTTP-Redirect-binding query parameter value (SAMLRequest or SAMLResponse when SAMLEncoding is absent or "urn:oasis:names:tc:SAML:2.0:bindings:URL-Encoding:DEFLATE", which is the only encoding the binding defines). maxBytes bounds the inflated output; <= 0 uses DefaultMaxInflatedBytes.

func InflateLimited

func InflateLimited(data []byte, maxBytes int64) ([]byte, error)

InflateLimited raw-DEFLATE-decompresses data (as used by the SAML HTTP-Redirect binding, RFC 1951 with no zlib/gzip wrapper) and returns the result, refusing to produce more than maxBytes of output.

This exists because a DEFLATE stream's decompressed size is not bounded by its compressed size in any way a decoder can check up front — a few-KB compressed payload can expand to gigabytes (GHSA-5mqj-xc49-246p is exactly this class of issue). InflateLimited enforces the cap by reading through the limit and erroring the moment it would be exceeded, rather than decompressing fully and checking len() afterward, so the large intermediate buffer is never allocated.

maxBytes <= 0 uses DefaultMaxInflatedBytes.

Types

type Assertion

type Assertion struct {
	// ID is the assertion's ID, guaranteed non-empty by the time this
	// struct exists (ValidateResponse/ValidateResponseXML reject an
	// assertion with an empty ID before it reaches here — see
	// ErrMissingAssertionID). It is what the replay cache keys on.
	ID string

	// IssueInstant is when the IdP says it created the assertion.
	IssueInstant time.Time

	// Issuer is the IdP's entity ID, as declared in the assertion.
	Issuer string

	// NameID is the value of <Subject><NameID>. Its meaning (a stable
	// account key, a human-readable UPN, an opaque per-SP pairwise
	// identifier, ...) depends entirely on how the IdP admin configured
	// the NameID source, which is why NameIDFormat is exposed alongside
	// it: a caller that needs a stable identifier should check the
	// format (crewjamsaml.TransientNameIDFormat is a fresh value on
	// every login and cannot key anything durable) rather than assume.
	NameID string

	// NameIDFormat is the Format attribute of <Subject><NameID>, e.g.
	// "urn:oasis:names:tc:SAML:2.0:nameid-format:transient". Empty if the
	// IdP did not set one.
	NameIDFormat string

	// SessionIndex is the AuthnStatement's SessionIndex, used to
	// correlate a later Single Logout request with this session. Empty
	// if the IdP did not send an AuthnStatement or left it blank.
	SessionIndex string

	// NotBefore and NotOnOrAfter are the assertion's Conditions validity
	// window (zero if the assertion had no Conditions element, which
	// crewjam's own validation would already have rejected in that case
	// for anything but a trivially permissive IdP — they are exposed
	// here mainly for a caller that wants to log or display them).
	NotBefore    time.Time
	NotOnOrAfter time.Time

	// Attributes holds every <Attribute> value, keyed by both its Name
	// and (if different) its FriendlyName — so a caller can look a value
	// up by whichever the admin configured to type in. Multiple
	// <AttributeValue> children of one <Attribute> element are ALWAYS
	// merged into one slice (that is simply how SAML expresses a
	// multi-valued attribute); see Config.StrictAttributes for a stricter
	// policy on the SAME name appearing on more than one <Attribute>
	// element.
	Attributes map[string][]string

	// AttributesByName holds the same values indexed by the attribute's
	// Name ALONE, never by its FriendlyName.
	//
	// It exists because Attributes cannot answer "what did the IdP put in
	// the attribute whose Name is X". An <Attribute>'s Name and
	// FriendlyName are frequently different strings pointing at the same
	// claim, and a second <Attribute> may legitimately be Named the first
	// one's FriendlyName — at which point the merged map holds both
	// attributes' values under one key with no way to tell which value came
	// from which. A caller mapping claims onto its own fields needs the
	// source, so it reads this map instead.
	//
	// Same rules for values as Attributes: per-Name order preserved,
	// repeated Names merged in encounter order, empty values kept, and an
	// attribute with no Name at all indexed nowhere.
	AttributesByName map[string][]string
}

Assertion is a platform-neutral view of a validated SAML assertion. It carries exactly what the SAML wire format carries — nothing is resolved into an account, a role, or any other application concept. A caller maps NameID and Attributes onto their own identity model using whatever configuration (which attribute is "email", which NameID formats are acceptable, ...) that model requires.

func (*Assertion) Attribute

func (a *Assertion) Attribute(name string) string

Attribute returns the first value for the named attribute (matched against either the Name or FriendlyName the IdP used), or "" if it was not sent.

func (*Assertion) IsTransient

func (a *Assertion) IsTransient() bool

IsTransient reports whether NameIDFormat is the SAML transient format — a value the IdP mints fresh on every login and which therefore cannot serve as a durable identifier. Provided as a convenience since every caller that keys an identity off NameID needs this check, but this package does not enforce it: an ephemeral or step-up-only flow may want a transient NameID on purpose.

type AuthnRequest

type AuthnRequest struct {
	// ID is the AuthnRequest's ID. The caller must persist it (however
	// they see fit — a server-side store, or embedded in RelayState —
	// this package does not care which) and pass it back as one of
	// possibleRequestIDs to ValidateResponse, so the eventual Response's
	// InResponseTo can be checked. Not needed if AllowIDPInitiated is
	// the only flow in use.
	ID string

	// RedirectURL is where to send the browser to start the login at the
	// IdP (HTTP-Redirect binding).
	RedirectURL string
}

AuthnRequest is the result of building an SP-initiated login redirect.

type Config

type Config struct {
	// EntityID is this SP's own entity ID, published in SP metadata and
	// checked against every assertion's AudienceRestriction.
	EntityID string

	// ACSURL is the URL this SP receives SAMLResponse POSTs at. It is
	// published in SP metadata as the (only) AssertionConsumerService,
	// and every Response's Destination must equal it exactly (see
	// RequireDestination).
	ACSURL string

	// Key signs outgoing AuthnRequests and LogoutRequests, and decrypts
	// an EncryptedAssertion when AllowEncryptedAssertions is true. Not
	// required for an SP that never signs requests and never accepts
	// encrypted assertions, but Certificate must be set if Key is.
	Key crypto.Signer

	// Certificate is the SP's own certificate, matching Key. Published
	// in SP metadata as both the signing and encryption KeyDescriptor.
	Certificate *x509.Certificate

	// IDPMetadata is the parsed metadata of the IdP this Provider trusts.
	// Fetching it, verifying its provenance, and refreshing it on a
	// schedule (IdPs rotate signing certs) are all the caller's job —
	// this package only consumes the parsed result. Required.
	IDPMetadata *crewjamsaml.EntityDescriptor

	// AllowIDPInitiated accepts a Response with no matching AuthnRequest
	// (no InResponseTo to check against). Off by default: an
	// IdP-initiated flow carries no request-bound state, which is itself
	// a CSRF-adjacent surface, so a caller opts in deliberately.
	AllowIDPInitiated bool

	// NameIDFormat is placed in the AuthnRequest's NameIDPolicy. Left at
	// "", crewjam defaults to "transient" — which forces a fresh,
	// unlinkable NameID on every login and is very often not what an
	// admin configured on the IdP side (this bit every one of the three
	// projects this package was assembled from). UnspecifiedNameIDFormat
	// emits no Format at all, letting the IdP fall back to whatever its
	// admin configured, and is used when this field is "".
	NameIDFormat crewjamsaml.NameIDFormat

	// ReplayCache records consumed assertion IDs. If nil, a
	// NewMemoryReplayCache with DefaultReplayCacheCapacity is used.
	ReplayCache ReplayCache

	// ReplayExpiryMargin is added on top of an assertion's effective
	// expiry (NotOnOrAfter, or the latest SubjectConfirmationData
	// NotOnOrAfter if later, plus crewjam's MaxClockSkew) when deciding
	// how long the replay cache must remember its ID. Zero uses
	// DefaultReplayExpiryMargin.
	ReplayExpiryMargin time.Duration

	// MaxResponseBytes caps the size of the decoded Response XML this
	// Provider will parse, independent of whatever limit the caller's
	// HTTP server places on the request body. Zero uses
	// DefaultMaxResponseBytes.
	MaxResponseBytes int64

	// MaxInflatedBytes caps DEFLATE decompression output when validating
	// a redirect-bound (compressed) message. Zero uses
	// DefaultMaxInflatedBytes.
	MaxInflatedBytes int64

	// RequireDestination rejects a Response whose Destination attribute
	// is absent, in addition to crewjam's own check (which always
	// rejects a Destination that is PRESENT but wrong). Defaults to true
	// (via requireDestinationDefault) — set explicitly to false only for
	// an IdP verified to omit Destination on every response.
	RequireDestination *bool

	// RejectWeakSignatures refuses a Response that declares a
	// SignatureMethod or DigestMethod weaker than SHA-256 anywhere in the
	// document (the outer Response signature, the Assertion signature,
	// or any Reference digest) — most importantly rsa-sha1, which ADFS
	// and older Keycloak default to and which no longer offers a
	// meaningful collision resistance. Checked on the raw XML, before
	// any signature is verified, so a strong outer signature can never
	// vouch for a weak inner one. Defaults to true.
	RejectWeakSignatures *bool

	// AllowEncryptedAssertions permits a Response containing an
	// EncryptedAssertion (decrypted with Key). Off by default: none of
	// the deployments this package was built from use it, decryption is
	// a padding-oracle-shaped attack surface, and TLS already covers the
	// transport for the Web SSO profile.
	AllowEncryptedAssertions bool

	// StrictAttributes rejects an assertion in which the same attribute
	// Name (or FriendlyName) is declared by more than one distinct
	// <Attribute> element — as opposed to one <Attribute> element with
	// several <AttributeValue> children, which is the normal way to send
	// a multi-valued attribute and is always allowed. Off by default,
	// since it is a stricter-than-spec policy some callers rely on (to
	// stop attribute pollution feeding a role-mapping rule) and others
	// have never needed.
	StrictAttributes bool

	// Clock returns the current time. Nil uses time.Now. Tests override
	// it to exercise expiry without sleeping.
	Clock func() time.Time
}

Config configures a Provider. EntityID, ACSURL and IDPMetadata are required; everything else has a documented default.

type MemoryReplayCache

type MemoryReplayCache struct {
	// contains filtered or unexported fields
}

MemoryReplayCache is an in-memory ReplayCache with a hard capacity bound and lazy expiry cleanup. At capacity, expired records are removed first. If every record is still valid, new IDs receive ErrReplayCacheFull. Accepted assertion IDs remain protected until expiry, including under capacity pressure.

A MemoryReplayCache protects a single process. A caller that needs replay protection to survive a restart, or to be shared across more than one instance of the SP, supplies a ReplayCache backed by their own durable store instead (this package's Provider accepts any ReplayCache via Config.ReplayCache).

func NewMemoryReplayCache

func NewMemoryReplayCache(capacity int) *MemoryReplayCache

NewMemoryReplayCache returns a MemoryReplayCache bounded at capacity entries. A capacity <= 0 uses DefaultReplayCacheCapacity.

func (*MemoryReplayCache) Len

func (c *MemoryReplayCache) Len() int

Len returns the current number of entries, including any not yet swept past their expiry. Exposed for tests and for a caller that wants to expose cache occupancy on a status/metrics endpoint.

func (*MemoryReplayCache) SeenOrAdd

func (c *MemoryReplayCache) SeenOrAdd(_ context.Context, id string, expiresAt time.Time, now time.Time) (bool, error)

SeenOrAdd implements ReplayCache. New IDs receive ErrReplayCacheFull when no expired record can make room. Existing unexpired IDs still return seen=true.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a validated SAML SP orchestration handle: an AuthnRequest builder, a metadata publisher, and a Response validator, all built around a single crewjam/saml ServiceProvider. Nothing on a Provider is mutated after New returns, so it is safe for concurrent use as long as its ReplayCache is (Config.ReplayCache documents that requirement; the built-in MemoryReplayCache meets it).

func New

func New(cfg Config) (*Provider, error)

New builds a Provider from cfg. It fails if EntityID, ACSURL, or IDPMetadata are missing, or if ACSURL does not parse as a URL.

func (*Provider) ACSURL

func (p *Provider) ACSURL() string

ACSURL returns the ACS URL this Provider was configured with.

func (*Provider) EntityID

func (p *Provider) EntityID() string

EntityID returns the SP entity ID this Provider was configured with.

func (*Provider) Metadata

func (p *Provider) Metadata() *crewjamsaml.EntityDescriptor

Metadata returns the SP metadata document describing this Provider, for the caller to serve (e.g. XML-marshal it) at whatever URL the IdP admin expects to import it from.

func (*Provider) MetadataXML

func (p *Provider) MetadataXML() ([]byte, error)

MetadataXML returns Metadata marshaled as indented XML, ready to serve at whatever URL the IdP admin expects to import it from.

func (*Provider) NewAuthnRequest

func (p *Provider) NewAuthnRequest(relayState string) (*AuthnRequest, error)

NewAuthnRequest builds an SP-initiated AuthnRequest and the URL to redirect the browser to, using the HTTP-Redirect binding to the IdP and requesting the HTTP-POST binding for the response. relayState is placed on the redirect verbatim (RFC 6.4) and handed back by the IdP with the Response; a common pattern is to fold the AuthnRequest ID and a post-login return path into it, but this package does not require any particular shape.

func (*Provider) ValidateRedirectResponse

func (p *Provider) ValidateRedirectResponse(ctx context.Context, rawQueryParam string, currentURL url.URL, possibleRequestIDs []string) (*Assertion, error)

ValidateRedirectResponse validates a Response delivered via the SAML HTTP-Redirect binding: base64-decoded and then DEFLATE-inflated under a hard size cap (see InflateLimited) before any XML parsing happens, so a decompression bomb is rejected before it can consume memory. Most deployments never receive a Response this way (POST binding is what all three projects this package was built from use), but the binding is valid per the SAML spec for small, typically-unsigned responses, and an IdP or a caller building SP-to-SP forwarding may use it.

func (*Provider) ValidateResponse

func (p *Provider) ValidateResponse(ctx context.Context, r *http.Request, possibleRequestIDs []string) (*Assertion, error)

ValidateResponse validates an HTTP-POST-binding SAMLResponse carried on r (a POST request to this Provider's ACS endpoint) and returns the resulting Assertion. possibleRequestIDs should contain the AuthnRequest ID(s) issued for this login (see AuthnRequest.ID); pass nil only when Config.AllowIDPInitiated is true and no matching request is expected.

r.URL is used as the "current URL" crewjam compares the Response's Destination against (see Config.RequireDestination for why this package checks it independently too). r.Body is NOT size-limited by this function — bound it yourself (e.g. http.MaxBytesReader) before calling ParseForm on r, the same way you would for any other POST handler; this package separately caps the size of the decoded XML it will parse (see Config.MaxResponseBytes), which is a different concern from bounding the raw HTTP body.

func (*Provider) ValidateResponseXML

func (p *Provider) ValidateResponseXML(ctx context.Context, decoded []byte, currentURL url.URL, possibleRequestIDs []string) (*Assertion, error)

ValidateResponseXML validates an already-decoded (not base64, not compressed) Response document — e.g. for a caller that received the SAMLResponse some other way than a standard POST-binding *http.Request, or one that wants to decode the HTTP layer itself. currentURL is compared against the Response's Destination exactly as ValidateResponse does.

type ReplayCache

type ReplayCache interface {
	// SeenOrAdd reports whether id has already been recorded and is not
	// yet expired. If it has not, it is recorded with the given
	// expiresAt and SeenOrAdd returns false. now is the time to evaluate
	// "already expired" against; a real caller passes the current time,
	// tests pass a fixed one.
	//
	// An implementation backed by a store that can fail (a database, a
	// remote cache, ...) returns a non-nil error on such a failure; the
	// caller then decides how to degrade (this package's own
	// Provider.ValidateResponse treats a ReplayCache error as a
	// validation failure — it never silently treats a store error as
	// "not seen").
	SeenOrAdd(ctx context.Context, id string, expiresAt time.Time, now time.Time) (seen bool, err error)
}

ReplayCache records SAML assertion IDs that have already been accepted, so a captured SAMLResponse cannot be replayed for the rest of its validity window — something crewjam/saml does not do on its own (see the package doc comment).

Implementations must be safe for concurrent use and must make SeenOrAdd's check-and-record atomic: if two goroutines call SeenOrAdd with the same id at the same time, at most one may receive seen == false. That is what turns a concurrent replay (e.g. the same captured SAMLResponse posted twice in parallel by an attacker racing the legitimate user) into "one succeeds, one is rejected" instead of "both succeed".

The package's own use of a ReplayCache never calls SeenOrAdd with a zero expiresAt or an empty id.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL