MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / fetch_token

Function fetch_token

vmm/src/app/registry.rs:328–332  ·  view source on GitHub ↗
(client: &Client, registry: &str, repo: &str)

Source from the content-addressed store, hash-verified

326}
327
328async fn fetch_token(client: &Client, registry: &str, repo: &str) -> Result<String> {
329 try_fetch_token(client, registry, repo)
330 .await
331 .context("registry requires authentication but token exchange failed")
332}
333
334/// Extract realm and service from a WWW-Authenticate: Bearer header.
335fn parse_www_authenticate(header: &str) -> (String, String) {

Callers 1

list_tags_with_tokenFunction · 0.85

Calls 1

try_fetch_tokenFunction · 0.85

Tested by

no test coverage detected