MCPcopy Create free account
hub / github.com/AzureAD/microsoft-authentication-library-for-python / _get_endpoints

Method _get_endpoints

msal/mex.py:117–127  ·  view source on GitHub ↗
(self, bindings, policy_ids)

Source from the content-addressed store, hash-verified

115 return bindings
116
117 def _get_endpoints(self, bindings, policy_ids):
118 endpoints = []
119 for port in self.dom.findall('wsdl:service/wsdl:port', self.NS):
120 binding_name = port.get("binding").split(':')[-1] # Should have 2 parts
121 binding = bindings.get(binding_name)
122 if binding and binding["policy_uri"] in policy_ids:
123 address = port.find('wsa10:EndpointReference/wsa10:Address', self.NS)
124 if address is not None and address.text.lower().startswith("https://"):
125 endpoints.append(
126 {"address": address.text, "action": binding["action"]})
127 return endpoints
128
129 def get_wstrust_username_password_endpoint(self):
130 """Returns {"address": "https://...", "action": "the soapAction value"}"""

Calls 2

findMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected