OIDC configuration discovery endpoint. Returns the OIDC issuer and audience when OIDC is configured on the server, so CLI clients can auto-discover settings during `gateway add`.
(State(state): State<Arc<ServerState>>)
| 67 | /// Returns the OIDC issuer and audience when OIDC is configured on the server, |
| 68 | /// so CLI clients can auto-discover settings during `gateway add`. |
| 69 | async fn oidc_config_handler(State(state): State<Arc<ServerState>>) -> impl IntoResponse { |
| 70 | state.config.oidc.as_ref().map_or_else( |
| 71 | || StatusCode::NOT_FOUND.into_response(), |
| 72 | |oidc| { |
| 73 | Json(serde_json::json!({ |
| 74 | "issuer": oidc.issuer, |
| 75 | "audience": oidc.audience, |
| 76 | })) |
| 77 | .into_response() |
| 78 | }, |
| 79 | ) |
| 80 | } |
| 81 | |
| 82 | /// Handle the auth connect request. |
| 83 | /// |
nothing calls this directly
no test coverage detected