()
return resp.json()
Fetch Google OAuth2 discovery document.

    Raises:
        DiscoveryDocumentError if document cannot be fetched.

    Returns:
        HTTP response.
Fetch Google OAuth2 discovery document.
Fetch Google OAuth2 discovery document .
def _fetch_oauth2_discovery_document():
    """Fetch Google OAuth2 discovery document.

    Raises:
        DiscoveryDocumentError if document cannot be fetched.

    Returns:
        HTTP response.
    """
    discovery_url = current_app.config.get(
        'GOOGLE_OIDC_DISCOVERY_URL', DISCOVERY_URL)
    try:
        resp = requests.get(discovery_url)
    except requests.exceptions.RequestException as e:
        raise DiscoveryDocumentError(
            'Cannot fetch discovery document: {}'.format(e)) from e
    if resp.status_code != HTTP_STATUS_CODE_OK:
        raise DiscoveryDocumentError(
            'Cannot fetch discovery_document: {}'.format(resp.status_code))
    return resp.json()
def _fetch_oauth2_discovery_document ( ) : discovery_url = current_app . config . get ( 'GOOGLE_OIDC_DISCOVERY_URL' , DISCOVERY_URL ) try : resp = requests . get ( discovery_url ) except requests . exceptions . RequestException as e : raise DiscoveryDocumentError ( 'Cannot fetch discovery document: {}' . format ( e ) ) from e if resp . status_code != HTTP_STATUS_CODE_OK : raise DiscoveryDocumentError ( 'Cannot fetch discovery_document: {}' . format ( resp . status_code ) ) return resp . json ( )