Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverProviders ¶
DiscoverProviders scans environment variables to find configured providers. It looks for environment variables matching the pattern: <prefix><PROVIDER_ID><suffix> For example, with prefix="SAML_PROVIDERS_" and suffix="_ENABLED", it will find "ENTRA_TMIDEV_SAML" from "SAML_PROVIDERS_ENTRA_TMIDEV_SAML_ENABLED=true"
func Get ¶
Get retrieves an environment variable with a fallback value. Returns the environment variable value if set and non-empty, otherwise returns the fallback.
func ProviderIDToKey ¶
ProviderIDToKey converts an environment variable provider ID to a provider key. It converts to lowercase and replaces underscores with hyphens. For example: "ENTRA_TMIDEV_SAML" -> "entra-tmidev-saml"
func ScanPrefixedMap ¶
ScanPrefixedMap returns a map of every environment variable whose name starts with prefix, keyed by the lowercased remainder of the name and valued by the variable's value. For example, with prefix "OAUTH_PROVIDERS_GOOGLE_USERINFO_CLAIMS_":
OAUTH_PROVIDERS_GOOGLE_USERINFO_CLAIMS_SUBJECT_CLAIM=sub -> {"subject_claim": "sub"}
OAUTH_PROVIDERS_GOOGLE_USERINFO_CLAIMS_EMAIL_CLAIM=email -> {"email_claim": "email"}
Returns a non-nil empty map when nothing matches. Used for OAuth userinfo claim mappings and additional OAuth parameters, which are dynamic-cardinality (the concrete keys are only known at runtime).
Types ¶
This section is empty.