MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / add_auth_header_opt

Function add_auth_header_opt

crates/cli/src/util.rs:155–160  ·  view source on GitHub ↗

Add an authorization header, if provided, to the request `builder`.

(mut builder: RequestBuilder, auth_header: &AuthHeader)

Source from the content-addressed store, hash-verified

153
154/// Add an authorization header, if provided, to the request `builder`.
155pub fn add_auth_header_opt(mut builder: RequestBuilder, auth_header: &AuthHeader) -> RequestBuilder {
156 if let Some(token) = &auth_header.token {
157 builder = builder.bearer_auth(token);
158 }
159 builder
160}
161
162/// Gets the `auth_header` for a request to the server depending on how you want
163/// to identify yourself. If you specify `anon_identity = true` then no

Callers 8

execFunction · 0.85
execFunction · 0.85
execute_publish_configsFunction · 0.85
call_pre_publishFunction · 0.85
execFunction · 0.85
send_requestFunction · 0.85
execFunction · 0.85
stream_logsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…