def METHOD_NAME(self, code: str, openid_provider: str = ""):
    """
    Obtain an ID Token using the Authorization Code flow
    """
    headers = {"Content-Type": "application/x-www-form-urlencoded"}
    payload = {
        "grant_type": "authorization_code",
        "code": code,
        "client_id": self.client_id,
        "client_secret": self.client_secret,
        "redirect_uri": self.provider_configuration.get("callback_uri"),
    }
    if "token_endpoint" not in self.provider_configuration:
        raise ValueError("token_endpoint not in provider configuration")
    response = requests.post(
        self.provider_configuration["token_endpoint"],
        params=payload,
        headers=headers,
    )
    if response.status_code == 200:
        id_token = response.json().get("id_token")
        return id_token
    retry_message = (
        "Failed to retrieve ID Token, "
        + f'<a href="/oidc/{openid_provider}">retry</a>'
        + "the authentication process"
    )
    raise Http404(_(retry_message))