MCPcopy Create free account
hub / github.com/containers/image / iterateAuthHeader

Function iterateAuthHeader

docker/wwwauthenticate.go:64–75  ·  view source on GitHub ↗
(header http.Header)

Source from the content-addressed store, hash-verified

62}
63
64func iterateAuthHeader(header http.Header) iter.Seq[challenge] {
65 return func(yield func(challenge) bool) {
66 for _, h := range header[http.CanonicalHeaderKey("WWW-Authenticate")] {
67 v, p := parseValueAndParams(h)
68 if v != "" {
69 if !yield(challenge{Scheme: v, Parameters: p}) {
70 return
71 }
72 }
73 }
74 }
75}
76
77// parseAuthScope parses an authentication scope string of the form `$resource:$remote:$actions`
78func parseAuthScope(scopeStr string) (*authScope, error) {

Callers 3

handleErrorResponseFunction · 0.85

Calls 1

parseValueAndParamsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…