MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / oidc_config_handler

Function oidc_config_handler

crates/openshell-server/src/auth/http.rs:69–80  ·  view source on GitHub ↗

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>>)

Source from the content-addressed store, hash-verified

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`.
69async 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///

Callers

nothing calls this directly

Calls 1

into_responseMethod · 0.80

Tested by

no test coverage detected