Documentation
¶
Overview ¶
Package authsaml adds SAML 2.0 SSO (service-provider) login to the togo auth family. It configures a crewjam/saml ServiceProvider from env, exposes the standard SP endpoints (metadata / login / ACS), and on a verified assertion finds-or-creates the user by the asserted email and issues an auth session via the auth plugin.
Configure with SAML_SP_CERT + SAML_SP_KEY (PEM keypair), SAML_IDP_METADATA_URL (or SAML_IDP_METADATA_XML), and SAML_ROOT_URL (the app's external base URL). When unconfigured the plugin still registers, but its endpoints return 501.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RootURL string // SAML_ROOT_URL, e.g. https://app.example.com
CertPEM string // SAML_SP_CERT
KeyPEM string // SAML_SP_KEY
IDPMetaURL string // SAML_IDP_METADATA_URL
IDPMetaXML string // SAML_IDP_METADATA_XML
ReturnURL string // SAML_RETURN_URL (post-login redirect, default "/")
}
Config holds the SP configuration resolved from the environment.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider holds the configured SAML ServiceProvider.
func FromKernel ¶
FromKernel returns the auth-saml Provider.