# Path: google/auth/jwt.py
# _DEFAULT_TOKEN_LIFETIME_SECS = 3600  # 1 hour in seconds
# _DEFAULT_MAX_CACHE_SIZE = 10
# _ALGORITHM_TO_VERIFIER_CLASS = {"RS256": crypt.RSAVerifier}
# _CRYPTOGRAPHY_BASED_ALGORITHMS = frozenset(["ES256"])
#     _ALGORITHM_TO_VERIFIER_CLASS["ES256"] = es256.ES256Verifier  # type: ignore
# def encode(signer, payload, header=None, key_id=None):
# def _decode_jwt_segment(encoded_section):
# def _unverified_decode(token):
# def decode_header(token):
# def _verify_iat_and_exp(payload, clock_skew_in_seconds=0):
# def decode(token, certs=None, verify=True, audience=None, clock_skew_in_seconds=0):
#     def __init__(
#         self,
#         signer,
#         issuer,
#         subject,
#         audience,
#         additional_claims=None,
#         token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
#         quota_project_id=None,
#     ):
#     def _from_signer_and_info(cls, signer, info, **kwargs):
#     def from_service_account_info(cls, info, **kwargs):
#     def from_service_account_file(cls, filename, **kwargs):
#     def from_signing_credentials(cls, credentials, audience, **kwargs):
#     def with_claims(
#         self, issuer=None, subject=None, audience=None, additional_claims=None
#     ):
#     def with_quota_project(self, quota_project_id):
#     def _make_jwt(self):
#     def refresh(self, request):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):
#     def __init__(
#         self,
#         signer,
#         issuer,
#         subject,
#         additional_claims=None,
#         token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
#         max_cache_size=_DEFAULT_MAX_CACHE_SIZE,
#         quota_project_id=None,
#     ):
#     def _from_signer_and_info(cls, signer, info, **kwargs):
#     def from_service_account_info(cls, info, **kwargs):
#     def from_service_account_file(cls, filename, **kwargs):
#     def from_signing_credentials(cls, credentials, **kwargs):
#     def with_claims(self, issuer=None, subject=None, additional_claims=None):
#     def with_quota_project(self, quota_project_id):
#     def valid(self):
#     def _make_jwt_for_audience(self, audience):
#     def _get_jwt_for_audience(self, audience):
#     def refresh(self, request):
#     def before_request(self, request, method, url, headers):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):
# class Credentials(
#     google.auth.credentials.Signing, google.auth.credentials.CredentialsWithQuotaProject
# ):
# class OnDemandCredentials(
#     google.auth.credentials.Signing, google.auth.credentials.CredentialsWithQuotaProject
# ):


import pytest
import google.oauth2._id_token_async
from google.auth import jwt
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


@pytest.mark.asyncio
async def test_fetch_id_token(http_request):
    audience = "https://pubsub.googleapis.com"

# Path: google/auth/jwt.py
# _DEFAULT_TOKEN_LIFETIME_SECS = 3600  # 1 hour in seconds
# _DEFAULT_MAX_CACHE_SIZE = 10
# _ALGORITHM_TO_VERIFIER_CLASS = {"RS256": crypt.RSAVerifier}
# _CRYPTOGRAPHY_BASED_ALGORITHMS = frozenset(["ES256"])
#     _ALGORITHM_TO_VERIFIER_CLASS["ES256"] = es256.ES256Verifier  # type: ignore
# def encode(signer, payload, header=None, key_id=None):
# def _decode_jwt_segment(encoded_section):
# def _unverified_decode(token):
# def decode_header(token):
# def _verify_iat_and_exp(payload, clock_skew_in_seconds=0):
# def decode(token, certs=None, verify=True, audience=None, clock_skew_in_seconds=0):
#     def __init__(
#         self,
#         signer,
#         issuer,
#         subject,
#         audience,
#         additional_claims=None,
#         token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
#         quota_project_id=None,
#     ):
#     def _from_signer_and_info(cls, signer, info, **kwargs):
#     def from_service_account_info(cls, info, **kwargs):
#     def from_service_account_file(cls, filename, **kwargs):
#     def from_signing_credentials(cls, credentials, audience, **kwargs):
#     def with_claims(
#         self, issuer=None, subject=None, audience=None, additional_claims=None
#     ):
#     def with_quota_project(self, quota_project_id):
#     def _make_jwt(self):
#     def refresh(self, request):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):
#     def __init__(
#         self,
#         signer,
#         issuer,
#         subject,
#         additional_claims=None,
#         token_lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
#         max_cache_size=_DEFAULT_MAX_CACHE_SIZE,
#         quota_project_id=None,
#     ):
#     def _from_signer_and_info(cls, signer, info, **kwargs):
#     def from_service_account_info(cls, info, **kwargs):
#     def from_service_account_file(cls, filename, **kwargs):
#     def from_signing_credentials(cls, credentials, **kwargs):
#     def with_claims(self, issuer=None, subject=None, additional_claims=None):
#     def with_quota_project(self, quota_project_id):
#     def valid(self):
#     def _make_jwt_for_audience(self, audience):
#     def _get_jwt_for_audience(self, audience):
#     def refresh(self, request):
#     def before_request(self, request, method, url, headers):
#     def sign_bytes(self, message):
#     def signer_email(self):
#     def signer(self):
# class Credentials(
#     google.auth.credentials.Signing, google.auth.credentials.CredentialsWithQuotaProject
# ):
# class OnDemandCredentials(
#     google.auth.credentials.Signing, google.auth.credentials.CredentialsWithQuotaProject
# ):


# Path: system_tests/system_tests_async/test_id_token.py
import pytest
import google.oauth2._id_token_async
from google.auth import jwt

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


@pytest.mark.asyncio
async def test_fetch_id_token(http_request):
    audience = "https://pubsub.googleapis.com"

    token = await google.oauth2._id_token_async.fetch_id_token(http_request, audience)