Versions in this module Expand all Collapse all v0 v0.1.1 Nov 8, 2026 v0.1.0 Nov 3, 2026 Changes in this version + const DefaultSubjectAttribute + var Event = map[string]string + func CAEPEvents() []string + func DefaultEndingEvents() []string + func DefaultEventsRequested() []string + func MetadataDocument(cfg *Config) string + func PostFormHTML(action string, fields map[string]string, nonce, title string) string + func RISCEvents() []string + func SubjectOf(subID any, issuer string) map[string]string + func VerifyCompactJWS(token string, keys []map[string]any) (map[string]any, map[string]any, error) + type Config struct + AcsURL string + AllowUnsolicited bool + Certificate *x509.Certificate + CertificatePEM string + ClockSkewMS int64 + EntityID string + IdpCA string + IdpEntityID string + IdpMetadata string + NameIDFormat string + PrivateKey *rsa.PrivateKey + PrivateKeyPEM string + RequestBinding string + ResponseBinding string + Signals *bool + WantAssertionsEncrypted bool + WantAssertionsSigned bool + func ReadConfigFile(path string, overrides map[string]any) (*Config, error) + func ResolveConfig(config map[string]any, baseDir string) (*Config, error) + func (c *Config) Has(key string) bool + type IdpMetadata struct + ArtifactResolutionServices map[int]string + Certs []*x509.Certificate + EntityID string + SSO map[string]string + WantAuthnRequestsSigned bool + func ReadIDPMetadata(xml string) (*IdpMetadata, error) + type KeyPair struct + Certificate *x509.Certificate + CertificatePEM string + PrivateKey *rsa.PrivateKey + PrivateKeyPEM string + func CreateSelfSignedKeyPair(commonName string, days, bits int) (*KeyPair, error) + func (k KeyPair) Fingerprint256() string + func (k KeyPair) ValidTo() string + type Logger interface + Error func(message string) + Info func(message string) + Warn func(message string) + type LoginOptions struct + ForceAuthn bool + IsPassive bool + Nonce string + RelayState *string + RequestBinding string + ResponseBinding string + SubjectHint *string + SubjectHintFormat *string + type LoginRequest struct + Binding string + Fields map[string]string + HTML string + ID string + ResponseBinding string + URL string + XML string + type MemoryReplayCache struct + func NewMemoryReplayCache(maxEntries int) *MemoryReplayCache + func (c *MemoryReplayCache) CheckAndRecord(assertionID string, expiresAt time.Time) (bool, error) + type MemorySessionIndex struct + func NewMemorySessionIndex(maxEntries int) *MemorySessionIndex + func (s *MemorySessionIndex) Add(session SessionRecord) + func (s *MemorySessionIndex) ByEmail(email string) []string + func (s *MemorySessionIndex) ByIdPSession(idpSession string) []string + func (s *MemorySessionIndex) ByPerson(person string) []string + func (s *MemorySessionIndex) Remove(localID string) + type ReceiverOptions struct + Description string + EndOn []string + EventsRequested []string + Headers func() map[string]string + Log Logger + MaxEvents int + OnEndSessions func(ids []string, event *SignalEvent) error + PollIntervalMS int + SessionIndex *MemorySessionIndex + SubjectAttribute string + TLS *TLSOptions + Transmitter string + type SamlError struct + Cause error + Code string + Message string + Status *SamlStatus + func (e *SamlError) Error() string + func (e *SamlError) Unwrap() error + type SamlLogin struct + AssertionID string + AttributeFriendlyNames map[string]string + Attributes map[string][]string + AuthnContextClassRef string + AuthnInstant time.Time + Binding string + Encrypted bool + InResponseTo *string + Issuer string + NameID string + NameIDFormat string + NameQualifier string + RelayState *string + ResponseID string + SPNameQualifier string + SessionIndex string + SessionNotOnOrAfter *time.Time + type SamlStatus struct + Code string + Message string + SubCode string + func (s SamlStatus) String() string + type ServiceProvider struct + Config *Config + Idp *IdpMetadata + func Create(config map[string]any, baseDir string, replay *MemoryReplayCache) (*ServiceProvider, error) + func FromFile(path string, overrides map[string]any, replay *MemoryReplayCache) (*ServiceProvider, error) + func (sp *ServiceProvider) Acs(method, rawURL string, body any, requestIDs []string) (*SamlLogin, error) + func (sp *ServiceProvider) Login(opt LoginOptions) (*LoginRequest, error) + func (sp *ServiceProvider) Metadata() string + func (sp *ServiceProvider) RefreshMetadata() (*IdpMetadata, error) + type SessionRecord struct + Email string + ExpiresAt *time.Time + IdPSession string + LocalID string + Person string + func TrackedFrom(localID string, login *SamlLogin, subjectAttribute string, ...) SessionRecord + type SignalEvent struct + Ended bool + Iat any + JTI string + Payload map[string]any + Sessions []string + Subject map[string]string + Txn *string + Type string + type SignalsReceiver struct + Stream map[string]any + func NewSignalsReceiver(opt ReceiverOptions) (*SignalsReceiver, error) + func (r *SignalsReceiver) On(eventType string, handler func(*SignalEvent) error) *SignalsReceiver + func (r *SignalsReceiver) PollOnce() (bool, error) + func (r *SignalsReceiver) Start() error + func (r *SignalsReceiver) Stop() + func (r *SignalsReceiver) Track(localID string, login *SamlLogin, expiresAt *time.Time) + func (r *SignalsReceiver) Untrack(localID string) + func (r *SignalsReceiver) Verify(state string) error + type TLSOptions struct + CA string + Cert string + Key string