MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / _parse_www_authenticate

Method _parse_www_authenticate

bbot/modules/docker_pull.py:101–111  ·  view source on GitHub ↗
(header)

Source from the content-addressed store, hash-verified

99
100 @staticmethod
101 def _parse_www_authenticate(header):
102 value = header
103 if value.lower().startswith("bearer "):
104 value = value[7:]
105 params = {}
106 for part in value.split(","):
107 part = part.strip()
108 if "=" in part:
109 key, _, val = part.partition("=")
110 params[key.strip()] = val.strip('"')
111 return params.get("realm", ""), params.get("service", ""), params.get("scope", "")
112
113 def _validate_realm(self, registry_url, realm):
114 registry_host = self.helpers.urlparse(registry_url).hostname or ""

Callers 2

docker_api_requestMethod · 0.95
checkMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

checkMethod · 0.64