Skip to main content

publish_entity_statement_to_discovery

Function publish_entity_statement_to_discovery 

Source
pub async fn publish_entity_statement_to_discovery(state: Arc<OAuthState>)
Expand description

Phase 0.5 Stage D — publish this AS’s signed entity statement to the federation directory (DiscoveryService).

Once published, federation peers in the cluster can resolve this issuer’s JWKS via DiscoveryClient.get_entity_statement(issuer) — no HTTPS round-trip required. The entity statement carries an exp (24h); callers should re-publish after each signing-key rotation so the embedded JWKS stays fresh.

Logs success/failure at debug level. Discovery push failures are non-fatal: the OAuth server continues to serve the entity statement at /.well-known/openid-federation and consumers can fall back to HTTPS resolution.