import requests


def _is_ssl_issue(jwks_url: str) -> bool:
    """Helper method to verify if auth failed because of an ssl issue looking up the jwks

    Args:
        jwks_url: url to the jwks endpoint

    Returns:
        true if it is an ssl error, false if anything else happens (success or any other failure)
    """
    result = False
    try:
        requests.get(jwks_url)
    except requests.exceptions.SSLError:
        result = True
    except:
        pass

    return result