Function well_known_openid

Source
pub async fn well_known_openid(
    app_conf: Data<ApplicationConfiguration>,
) -> ControllerResult<HttpResponse>
Expand description

Handles /.well-known/openid-configuration to expose OIDC discovery metadata.

This endpoint advertises the AS/OP capabilities so clients can auto-configure:

  • Endpoints (authorize, token, userinfo, jwks)
  • Supported response/grant types
  • Token endpoint auth methods
  • ID Token signing algs
  • PKCE and DPoP metadata

Follows:

§Example

GET /api/v0/main-frontend/oauth/.well-known/openid-configuration HTTP/1.1

Example response (truncated):

{
  "issuer": "https://example.org/api/v0/main-frontend/oauth",
  "authorization_endpoint": "https://example.org/api/v0/main-frontend/oauth/authorize",
  "token_endpoint": "https://example.org/api/v0/main-frontend/oauth/token",
  "userinfo_endpoint": "https://example.org/api/v0/main-frontend/oauth/userinfo",
  "jwks_uri": "https://example.org/api/v0/main-frontend/oauth/jwks.json",
  "response_types_supported": ["code"],
  "grant_types_supported": ["authorization_code","refresh_token"],
  "code_challenge_methods_supported": ["S256"],
  "token_endpoint_auth_methods_supported": ["none","client_secret_post"],
  "id_token_signing_alg_values_supported": ["RS256"],
  "subject_types_supported": ["public"],
  "dpop_signing_alg_values_supported": ["ES256","RS256"]
}