Expand description
Product-neutral normalization helpers for external authentication settings.
These helpers cover small validation rules that recur in Aster services: provider keys, scopes, claim names, provider URLs, allow-listed email domains, flow tokens, return paths, and hashed login-flow secrets. Product crates still own callback URL construction, local email validation, persisted provider rows, API error codes, and account-linking policy.
Constants§
- DEFAULT_
EXTERNAL_ AUTH_ IDENTITY_ NAMESPACE_ MAX_ LEN - Default maximum length for provider identity namespace values such as issuer URLs.
- DEFAULT_
EXTERNAL_ AUTH_ URL_ MAX_ LEN - Default maximum length for external-auth provider URLs.
- DEFAULT_
SCOPES - Default scopes used when a provider or request does not specify its own scope list.
Functions§
- email_
domain_ allowed - Returns whether an email address is allowed by a stored allow-list JSON string.
- normalize_
allowed_ domains - Normalizes an allow-list of email domains into a stable JSON string.
- normalize_
flow_ token - Normalizes an external-auth flow token supplied by a client.
- normalize_
icon_ url_ input - Normalizes an icon URL that may be a root-relative path or HTTPS URL.
- normalize_
issuer_ url_ input - Normalizes an issuer URL.
- normalize_
manual_ endpoint_ input - Normalizes a manually configured provider endpoint.
- normalize_
optional_ claim - Normalizes an optional provider claim name.
- normalize_
provider_ key - Normalizes an application-owned provider key.
- normalize_
required_ field - Normalizes a required string field with a byte-length limit.
- normalize_
return_ path - Normalizes a post-login return path.
- normalize_
scopes - Normalizes scopes with Forge’s default
openid email profilevalue. - normalize_
scopes_ with_ default - Normalizes scopes with a caller-provided default.
- parse_
allowed_ domains - Parses a stored allow-list JSON string into domain entries.
- state_
hash - Hashes an OAuth/OIDC state value before persistence.
- token_
hash - Hashes an external-auth flow token before persistence.