# Path: atlassian_jwt_auth/contrib/aiohttp/auth.py
# def create_jwt_auth(
#         issuer, key_identifier, private_key_pem, audience, **kwargs):
#     """Instantiate a JWTAuth while creating the signer inline"""
#     return JWTAuth.create(
#         issuer, key_identifier, private_key_pem, audience, **kwargs)
# 
# class JWTAuth(BaseJWTAuth, BasicAuth):
#     """Adds a JWT bearer token to the request per the ASAP specification
# 
#     It should be aiohttp.BasicAuth subclass, so redefine its `__new__` method.
#     """
#     def __new__(cls, *args, **kwargs):
#         return super().__new__(cls, '')
# 
#     def encode(self):
#         return self._get_header_value().decode(self.encoding)
# 
# Path: atlassian_jwt_auth/tests/utils.py
# def get_new_rsa_private_key_in_pem_format():
# def get_public_key_pem_for_private_key_pem(private_key_pem):
# def get_example_jwt_auth_signer(**kwargs):
# def create_token(issuer, audience, key_id, private_key, subject=None):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
# class BaseJWTAlgorithmTestMixin(object):
# class RS256KeyTestMixin(object):
# class ES256KeyTestMixin(object):
# 
# Path: atlassian_jwt_auth/contrib/tests/test_requests.py
# class BaseRequestsTest(object):
# class RequestsRS256Test(BaseRequestsTest,
#                         utils.RS256KeyTestMixin,
#                         unittest.TestCase):
# class RequestsES256Test(BaseRequestsTest,
#                         utils.ES256KeyTestMixin,
#                         unittest.TestCase):
#     def setUp(self):
#     def assert_authorization_header_is_valid(self, auth):
#     def _get_auth_header(self, auth):
#     def create_jwt_auth(self, *args, **kwargs):
#     def test_JWTAuth_make_authenticated_request(self):
#     def test_create_jwt_auth(self):
#     def test_create_jwt_auth_with_additional_claims(self):
#     def test_do_not_reuse_jwts(self):
#     def test_reuse_jwts(self):
#     def test_do_not_reuse_jwt_if_audience_changes(self):
#     def test_do_not_reuse_jwt_if_issuer_changes(self):
#     def test_do_not_reuse_jwt_if_lifetime_changes(self):
#     def test_do_not_reuse_jwt_if_subject_changes(self):
#     def test_do_not_reuse_jwt_if_additional_claims_change(self):
#     def test_reuse_jwt_with_additional_claims(self):


import unittest
from atlassian_jwt_auth.contrib.aiohttp.auth import create_jwt_auth, JWTAuth
from atlassian_jwt_auth.tests import utils
from atlassian_jwt_auth.contrib.tests import test_requests



class BaseAuthTest(test_requests.BaseRequestsTest):
    """ tests for the contrib.aiohttp.JWTAuth class """
    auth_cls = JWTAuth

    def _get_auth_header(self, auth):
        return auth.encode().encode('latin1')

    def create_jwt_auth(self, *args, **kwargs):

# Path: atlassian_jwt_auth/contrib/aiohttp/auth.py
# def create_jwt_auth(
#         issuer, key_identifier, private_key_pem, audience, **kwargs):
#     """Instantiate a JWTAuth while creating the signer inline"""
#     return JWTAuth.create(
#         issuer, key_identifier, private_key_pem, audience, **kwargs)
# 
# class JWTAuth(BaseJWTAuth, BasicAuth):
#     """Adds a JWT bearer token to the request per the ASAP specification
# 
#     It should be aiohttp.BasicAuth subclass, so redefine its `__new__` method.
#     """
#     def __new__(cls, *args, **kwargs):
#         return super().__new__(cls, '')
# 
#     def encode(self):
#         return self._get_header_value().decode(self.encoding)
# 
# Path: atlassian_jwt_auth/tests/utils.py
# def get_new_rsa_private_key_in_pem_format():
# def get_public_key_pem_for_private_key_pem(private_key_pem):
# def get_example_jwt_auth_signer(**kwargs):
# def create_token(issuer, audience, key_id, private_key, subject=None):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
#     def algorithm(self):
#     def get_new_private_key_in_pem_format(self):
# class BaseJWTAlgorithmTestMixin(object):
# class RS256KeyTestMixin(object):
# class ES256KeyTestMixin(object):
# 
# Path: atlassian_jwt_auth/contrib/tests/test_requests.py
# class BaseRequestsTest(object):
# class RequestsRS256Test(BaseRequestsTest,
#                         utils.RS256KeyTestMixin,
#                         unittest.TestCase):
# class RequestsES256Test(BaseRequestsTest,
#                         utils.ES256KeyTestMixin,
#                         unittest.TestCase):
#     def setUp(self):
#     def assert_authorization_header_is_valid(self, auth):
#     def _get_auth_header(self, auth):
#     def create_jwt_auth(self, *args, **kwargs):
#     def test_JWTAuth_make_authenticated_request(self):
#     def test_create_jwt_auth(self):
#     def test_create_jwt_auth_with_additional_claims(self):
#     def test_do_not_reuse_jwts(self):
#     def test_reuse_jwts(self):
#     def test_do_not_reuse_jwt_if_audience_changes(self):
#     def test_do_not_reuse_jwt_if_issuer_changes(self):
#     def test_do_not_reuse_jwt_if_lifetime_changes(self):
#     def test_do_not_reuse_jwt_if_subject_changes(self):
#     def test_do_not_reuse_jwt_if_additional_claims_change(self):
#     def test_reuse_jwt_with_additional_claims(self):


# Path: atlassian_jwt_auth/contrib/tests/aiohttp/test_auth.py
import unittest
from atlassian_jwt_auth.contrib.aiohttp.auth import create_jwt_auth, JWTAuth
from atlassian_jwt_auth.tests import utils
from atlassian_jwt_auth.contrib.tests import test_requests




class BaseAuthTest(test_requests.BaseRequestsTest):
    """ tests for the contrib.aiohttp.JWTAuth class """
    auth_cls = JWTAuth

    def _get_auth_header(self, auth):
        return auth.encode().encode('latin1')

    def create_jwt_auth(self, *args, **kwargs):

        return create_jwt_auth(*args, **kwargs)