get_idp_url

ciecplib.utils.get_idp_url(url_or_name, idplist_url='https://cilogon.org/include/ecpidps.txt', kerberos=False)

Return the unique IdP URL for a given institution or URL stub.

Parameters:
  • url_or_name (str) – the name of an institution, or a URL for the endpoint, or part thereof

  • idplist_url (str, optional) – the URL to query for the list of enabled ECP IdPs

  • kerberos (bool, optional) – if True return a Kerberos URL, if available, otherwise return a standard SAML/ECP endpoint URL

Returns:

url (str) – the formatted URL of the IdP ECP endpoint

Raises:

ValueError – if there isn’t a unique match for either the institution name, or the IdP URL

Examples

>>> get_idp_url("LIGO")
'https://login.ligo.org/idp/profile/SAML2/SOAP/ECP'
>>> get_idp_url("ligo.org")
'https://login.ligo.org/idp/profile/SAML2/SOAP/ECP'