# Path: atlassian_jwt_auth/algorithms.py
# def get_permitted_algorithm_names():
# 
# Path: atlassian_jwt_auth/key.py
# PEM_FILE_TYPE = 'application/x-pem-file'
# class KeyIdentifier(object):
# class BasePublicKeyRetriever(object):
# class HTTPSPublicKeyRetriever(BasePublicKeyRetriever):
# class HTTPSMultiRepositoryPublicKeyRetriever(BasePublicKeyRetriever):
# class BasePrivateKeyRetriever(object):
# class DataUriPrivateKeyRetriever(BasePrivateKeyRetriever):
# class StaticPrivateKeyRetriever(BasePrivateKeyRetriever):
# class FilePrivateKeyRetriever(BasePrivateKeyRetriever):
# class FilePrivateKeyRepository(object):
#     def __init__(self, identifier):
#     def key_id(self):
# def validate_key_identifier(identifier):
# def _get_key_id_from_jwt_header(a_jwt):
#     def retrieve(self, key_identifier, **kwargs):
#     def __init__(self, base_url):
#     def _get_session(self):
#     def retrieve(self, key_identifier, **requests_kwargs):
#     def _retrieve(self, url, requests_kwargs):
#     def _check_content_type(self, url, content_type):
#     def __init__(self, key_repository_urls):
#     def _create_retrievers(self, key_repository_urls):
#     def handle_retrieval_exception(self, retriever, exception):
#     def retrieve(self, key_identifier, **requests_kwargs):
#     def load(self, issuer):
#     def __init__(self, data_uri):
#     def load(self, issuer):
#     def __init__(self, key_identifier, private_key_pem):
#     def load(self, issuer):
#     def __init__(self, private_key_repository_path):
#     def load(self, issuer):
#     def _find_last_key_id(self, issuer):
#     def __init__(self, path):
#     def find_valid_key_ids(self, issuer):
#     def load_key(self, key_identifier):
# 
# Path: atlassian_jwt_auth/exceptions.py
# class _WrappedException(object):
# class _WithStatus(object):
# class ASAPAuthenticationException(_WrappedException, ValueError):
# class PublicKeyRetrieverException(_WithStatus, ASAPAuthenticationException):
# class PrivateKeyRetrieverException(_WithStatus, ASAPAuthenticationException):
# class KeyIdentifierException(ASAPAuthenticationException):
# class JtiUniquenessException(ASAPAuthenticationException):
# class SubjectDoesNotMatchIssuerException(ASAPAuthenticationException):
# class NoTokenProvidedError(ASAPAuthenticationException):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):


from collections import OrderedDict
from functools import lru_cache
from cryptography.hazmat.primitives.asymmetric.ec import (
    EllipticCurvePublicKey
)
from cryptography.hazmat.primitives.asymmetric.rsa import (
    RSAPublicKey
)
from jwt.exceptions import InvalidAlgorithmError
from atlassian_jwt_auth import algorithms
from atlassian_jwt_auth import key
from atlassian_jwt_auth import exceptions
import jwt
import jwt.api_jwt




class JWTAuthVerifier(object):

    """ This class can be used to verify a JWT. """

    def __init__(self, public_key_retriever, **kwargs):
        self.public_key_retriever = public_key_retriever

# Path: atlassian_jwt_auth/algorithms.py
# def get_permitted_algorithm_names():
# 
# Path: atlassian_jwt_auth/key.py
# PEM_FILE_TYPE = 'application/x-pem-file'
# class KeyIdentifier(object):
# class BasePublicKeyRetriever(object):
# class HTTPSPublicKeyRetriever(BasePublicKeyRetriever):
# class HTTPSMultiRepositoryPublicKeyRetriever(BasePublicKeyRetriever):
# class BasePrivateKeyRetriever(object):
# class DataUriPrivateKeyRetriever(BasePrivateKeyRetriever):
# class StaticPrivateKeyRetriever(BasePrivateKeyRetriever):
# class FilePrivateKeyRetriever(BasePrivateKeyRetriever):
# class FilePrivateKeyRepository(object):
#     def __init__(self, identifier):
#     def key_id(self):
# def validate_key_identifier(identifier):
# def _get_key_id_from_jwt_header(a_jwt):
#     def retrieve(self, key_identifier, **kwargs):
#     def __init__(self, base_url):
#     def _get_session(self):
#     def retrieve(self, key_identifier, **requests_kwargs):
#     def _retrieve(self, url, requests_kwargs):
#     def _check_content_type(self, url, content_type):
#     def __init__(self, key_repository_urls):
#     def _create_retrievers(self, key_repository_urls):
#     def handle_retrieval_exception(self, retriever, exception):
#     def retrieve(self, key_identifier, **requests_kwargs):
#     def load(self, issuer):
#     def __init__(self, data_uri):
#     def load(self, issuer):
#     def __init__(self, key_identifier, private_key_pem):
#     def load(self, issuer):
#     def __init__(self, private_key_repository_path):
#     def load(self, issuer):
#     def _find_last_key_id(self, issuer):
#     def __init__(self, path):
#     def find_valid_key_ids(self, issuer):
#     def load_key(self, key_identifier):
# 
# Path: atlassian_jwt_auth/exceptions.py
# class _WrappedException(object):
# class _WithStatus(object):
# class ASAPAuthenticationException(_WrappedException, ValueError):
# class PublicKeyRetrieverException(_WithStatus, ASAPAuthenticationException):
# class PrivateKeyRetrieverException(_WithStatus, ASAPAuthenticationException):
# class KeyIdentifierException(ASAPAuthenticationException):
# class JtiUniquenessException(ASAPAuthenticationException):
# class SubjectDoesNotMatchIssuerException(ASAPAuthenticationException):
# class NoTokenProvidedError(ASAPAuthenticationException):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):


# Path: atlassian_jwt_auth/verifier.py
from collections import OrderedDict
from functools import lru_cache
from cryptography.hazmat.primitives.asymmetric.ec import (
    EllipticCurvePublicKey
)
from cryptography.hazmat.primitives.asymmetric.rsa import (
    RSAPublicKey
)
from jwt.exceptions import InvalidAlgorithmError
from atlassian_jwt_auth import algorithms
from atlassian_jwt_auth import key
from atlassian_jwt_auth import exceptions
import jwt
import jwt.api_jwt





class JWTAuthVerifier(object):

    """ This class can be used to verify a JWT. """

    def __init__(self, public_key_retriever, **kwargs):
        self.public_key_retriever = public_key_retriever

        self.algorithms = algorithms.get_permitted_algorithm_names()