MCPcopy Create free account
hub / github.com/clawshell/clawshell / inject_auth

Method inject_auth

src/oauth/codex.rs:359–367  ·  view source on GitHub ↗
(&self, headers: &mut HeaderMap, access_token: &str)

Source from the content-addressed store, hash-verified

357 }
358
359 fn inject_auth(&self, headers: &mut HeaderMap, access_token: &str) -> Result<(), OAuthError> {
360 headers.insert(AUTHORIZATION, format!("Bearer {access_token}").parse()?);
361 // ChatGPT backend requires Accept header for SSE streaming
362 headers.insert(
363 axum::http::header::ACCEPT,
364 "text/event-stream".parse().unwrap(),
365 );
366 Ok(())
367 }
368
369 fn prepare_request_body(
370 &self,

Callers 1

test_inject_authFunction · 0.45

Calls 1

parseMethod · 0.80

Tested by 1

test_inject_authFunction · 0.36