def get_all_shib_idps():
    '\n    Get the list of all existing Shibboleth IDPs.\n    This function only returns the information we need to generate login URLs.\n\n    Returns:\n        list: list of {"idp": "", "name": ""} dictionaries\n    '
    url = config['OPENID_CONNECT'].get('fence', {}).get('shibboleth_discovery_url')
    if (not url):
        raise InternalError('Unable to get list of Shibboleth IDPs: OPENID_CONNECT.fence.shibboleth_discovery_url not configured')
    res = requests.get(url)
    assert (res.status_code == 200), 'Unable to get list of Shibboleth IDPs from {}'.format(url)
    all_shib_idps = []
    for shib_idp in res.json():
        if ('entityID' not in shib_idp):
            logger.warning(f"get_all_shib_idps(): 'entityID' field not in IDP data: {shib_idp}. Skipping this IDP.")
            continue
        idp = shib_idp['entityID']
        if (len(shib_idp.get('DisplayNames', [])) > 0):
            name = get_shib_idp_en_name(shib_idp['DisplayNames'])
        else:
            logger.warning(f"get_all_shib_idps(): 'DisplayNames' field not in IDP data: {shib_idp}. Using IDP ID '{idp}' as IDP name.")
            name = idp
        all_shib_idps.append({'idp': idp, 'name': name})
    return all_shib_idps
Get the list of all existing Shibboleth IDPs.
This function only returns the information we need to generate login URLs.

Returns:
    list: list of {"idp": "", "name": ""} dictionaries
def get_all_shib_idps():
    '\n    Get the list of all existing Shibboleth IDPs.\n    This function only returns the information we need to generate login URLs.\n\n    Returns:\n        list: list of {"idp": , "name": } dictionaries\n    '
    url = config['OPENID_CONNECT'].get('fence', {}).get('shibboleth_discovery_url')
    if (not url):
        raise InternalError('Unable to get list of Shibboleth IDPs: OPENID_CONNECT.fence.shibboleth_discovery_url not configured')
    res = requests.get(url)
    assert (res.status_code == 200), 'Unable to get list of Shibboleth IDPs from {}'.format(url)
    all_shib_idps = []
    for shib_idp in res.json():
        if ('entityID' not in shib_idp):
            logger.warning(f"get_all_shib_idps(): 'entityID' field not in IDP data: {shib_idp}. Skipping this IDP.")
            continue
        idp = shib_idp['entityID']
        if (len(shib_idp.get('DisplayNames', [])) > 0):
            name = get_shib_idp_en_name(shib_idp['DisplayNames'])
        else:
            logger.warning(f"get_all_shib_idps(): 'DisplayNames' field not in IDP data: {shib_idp}. Using IDP ID '{idp}' as IDP name.")
            name = idp
        all_shib_idps.append({'idp': idp, 'name': name})
    return all_shib_idps