## - ${SSO_AUTHORITY}/.well-known/openid-configuration should return a json document: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse
## - ${SSO_AUTHORITY}/.well-known/openid-configuration should return a json document: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse
# SSO_AUTHORITY=https://auth.example.com
# SSO_AUTHORITY=https://auth.example.com
## Optional internal base URL for server-side OIDC requests (discovery, token, userinfo, JWKS)
## - If set, discovery and any discovered endpoints that share SSO_AUTHORITY prefix are rewritten to this URL.
## - Keeps the public issuer for validation and browser redirects. Useful for K8s/Docker where Vaultwarden and IdP share a private network.
## - Example (cluster-internal): SSO_INTERNAL_ENDPOINT=http://sso:8080
## - Example (Keycloak with realm): SSO_AUTHORITY=https://sso.example.com/realms/myrealm, SSO_INTERNAL_ENDPOINT=http://keycloak:8080/realms/myrealm
# SSO_INTERNAL_ENDPOINT=http://sso:8080
## Optional explicit overrides for discovered endpoints (full URLs, take precedence over discovery and SSO_INTERNAL_ENDPOINT)
## - Names match ProviderMetadata fields prefixed with SSO_ (e.g. jwks_uri -> SSO_JWKS_URI, token_endpoint -> SSO_TOKEN_ENDPOINT)
# SSO_TOKEN_ENDPOINT=http://sso:8080/token
# SSO_USERINFO_ENDPOINT=http://sso:8080/userinfo
# SSO_JWKS_URI=http://sso:8080/jwks
## Authorization request scopes. Optional SSO scopes, override if email and profile are not enough (`openid` is implicit).
## Authorization request scopes. Optional SSO scopes, override if email and profile are not enough (`openid` is implicit).
/// Authority Server |> Base url of the OIDC provider discovery endpoint (without `/.well-known/openid-configuration`)
/// Authority Server |> Base url of the OIDC provider discovery endpoint (without `/.well-known/openid-configuration`)
sso_authority: String,true,def,String::new();
sso_authority: String,true,def,String::new();
/// Internal Endpoint |> Optional internal base URL for server-side OIDC requests (discovery, token, userinfo, JWKS). If set, requests to SSO_AUTHORITY are rewritten to this URL. Also rewrites discovered endpoints that share SSO_AUTHORITY prefix.
sso_internal_endpoint: String,true,option;
/// Token endpoint override |> Optional full URL override for token_endpoint (e.g. https://sso.example.com/token). If set, discovered value is ignored.
sso_token_endpoint: String,true,option;
/// UserInfo endpoint override |> Optional full URL override for userinfo_endpoint
sso_userinfo_endpoint: String,true,option;
/// JWKS URI override |> Optional full URL override for jwks_uri
sso_jwks_uri: String,true,option;
/// Authorization request scopes |> List the of the needed scope (`openid` is implicit)
/// Authorization request scopes |> List the of the needed scope (`openid` is implicit)