MCPcopy Index your code
hub / github.com/RustPython/RustPython / find_user_password

Method find_user_password

Lib/urllib/request.py:819–827  ·  view source on GitHub ↗
(self, realm, authuri)

Source from the content-addressed store, hash-verified

817 self.passwd[realm][reduced_uri] = (user, passwd)
818
819 def find_user_password(self, realm, authuri):
820 domains = self.passwd.get(realm, {})
821 for default_port in True, False:
822 reduced_authuri = self.reduce_uri(authuri, default_port)
823 for uris, authinfo in domains.items():
824 for uri in uris:
825 if self.is_suburi(uri, reduced_authuri):
826 return authinfo
827 return None, None
828
829 def reduce_uri(self, uri, default_port=True):
830 """Accept authority or URI and extract only the authority and path."""

Callers 4

find_user_passwordMethod · 0.45
retry_http_basic_authMethod · 0.45
http_requestMethod · 0.45
get_authorizationMethod · 0.45

Calls 4

reduce_uriMethod · 0.95
is_suburiMethod · 0.95
getMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected