(header http.Header)
| 62 | } |
| 63 | |
| 64 | func 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` |
| 78 | func parseAuthScope(scopeStr string) (*authScope, error) { |
no test coverage detected
searching dependent graphs…