# Path: virgil_sdk/jwt/jwt_header_content.py
# class JwtHeaderContent(object):
#     """JwtHeaderContent represents header of Jwt"""
# 
#     ACCESS_TOKEN_TYPE = "JWT"
#     CONTENT_TYPE = "virgil-jwt;v=1"
# 
#     def __init__(
#         self,
#         algorithm,  # type: str
#         key_id,  # type: str
#         access_token_type=ACCESS_TOKEN_TYPE,  # type: str
#         content_type=CONTENT_TYPE  # type: str
#     ):
#         self._algorithm = algorithm
#         self._key_id = key_id
#         self._access_token_type = access_token_type
#         self._content_type = content_type
# 
#     def __eq__(self, other):
#         return all([
#             self.algorithm == other.algorithm,
#             self.key_id == other.key_id,
#             self.access_token_type == other.access_token_type,
#             self.content_type == other.content_type
#         ])
# 
#     @classmethod
#     def from_json(cls, json_loaded_dict):
#         # type: (Union[dict, str, bytes, bytearray]) -> JwtHeaderContent
#         """
#         Initializes a new instance of the JwtHeaderContent from json representation.
# 
#         Args:
#             json_loaded_dict: JwtHeaderContent json representation
# 
#         Returns:
#             A new instance of JwtHeaderContent.
#         """
#         header_content = cls.__new__(cls)
#         header_content._algorithm = json_loaded_dict["alg"]
#         header_content._access_token_type = json_loaded_dict["typ"]
#         header_content._content_type = json_loaded_dict["cty"]
#         header_content._key_id = json_loaded_dict["kid"]
#         return header_content
# 
#     @property
#     def json(self):
#         """JwtHeaderContent json representation."""
#         return OrderedDict({
#             "alg": self.algorithm,
#             "typ": self.access_token_type,
#             "cty": self.content_type,
#             "kid": self.key_id
#         })
# 
#     @property
#     def algorithm(self):
#         """Signature algorithm."""
#         return self._algorithm
# 
#     @property
#     def key_id(self):
#         """Id of public key which is used for jwt signature verification."""
#         return self._key_id
# 
#     @property
#     def access_token_type(self):
#         """Access token type."""
#         return self._access_token_type
# 
#     @property
#     def content_type(self):
#         """Access token content type."""
#         return self._content_type


from .jwt_header_content import JwtHeaderContent
# POSSIBILITY OF SUCH DAMAGE.


class JwtVerifier(object):
    """The JwtVerifier provides verification for Jwt."""

    def __init__(
            self,
            access_token_signer,
            api_public_key,
            api_public_key_id
    ):
        self._access_token_signer = access_token_signer
        self._api_public_key = api_public_key
        self._api_public_key_id = api_public_key_id

    def verify_token(self, jwt_token):
        # type: (Jwt) -> bool
        """
        To verify specified token.

        Args:
            jwt_token: An instance of Jwt to be verified.

        Returns:
            True if token is verified, otherwise False.
        """
        if jwt_token._header_content.key_id != self._api_public_key_id or\
           jwt_token._header_content.algorithm != self._access_token_signer.algorithm or\
           jwt_token._header_content.access_token_type != JwtHeaderContent.ACCESS_TOKEN_TYPE or\

# Path: virgil_sdk/jwt/jwt_header_content.py
# class JwtHeaderContent(object):
#     """JwtHeaderContent represents header of Jwt"""
# 
#     ACCESS_TOKEN_TYPE = "JWT"
#     CONTENT_TYPE = "virgil-jwt;v=1"
# 
#     def __init__(
#         self,
#         algorithm,  # type: str
#         key_id,  # type: str
#         access_token_type=ACCESS_TOKEN_TYPE,  # type: str
#         content_type=CONTENT_TYPE  # type: str
#     ):
#         self._algorithm = algorithm
#         self._key_id = key_id
#         self._access_token_type = access_token_type
#         self._content_type = content_type
# 
#     def __eq__(self, other):
#         return all([
#             self.algorithm == other.algorithm,
#             self.key_id == other.key_id,
#             self.access_token_type == other.access_token_type,
#             self.content_type == other.content_type
#         ])
# 
#     @classmethod
#     def from_json(cls, json_loaded_dict):
#         # type: (Union[dict, str, bytes, bytearray]) -> JwtHeaderContent
#         """
#         Initializes a new instance of the JwtHeaderContent from json representation.
# 
#         Args:
#             json_loaded_dict: JwtHeaderContent json representation
# 
#         Returns:
#             A new instance of JwtHeaderContent.
#         """
#         header_content = cls.__new__(cls)
#         header_content._algorithm = json_loaded_dict["alg"]
#         header_content._access_token_type = json_loaded_dict["typ"]
#         header_content._content_type = json_loaded_dict["cty"]
#         header_content._key_id = json_loaded_dict["kid"]
#         return header_content
# 
#     @property
#     def json(self):
#         """JwtHeaderContent json representation."""
#         return OrderedDict({
#             "alg": self.algorithm,
#             "typ": self.access_token_type,
#             "cty": self.content_type,
#             "kid": self.key_id
#         })
# 
#     @property
#     def algorithm(self):
#         """Signature algorithm."""
#         return self._algorithm
# 
#     @property
#     def key_id(self):
#         """Id of public key which is used for jwt signature verification."""
#         return self._key_id
# 
#     @property
#     def access_token_type(self):
#         """Access token type."""
#         return self._access_token_type
# 
#     @property
#     def content_type(self):
#         """Access token content type."""
#         return self._content_type


# Path: virgil_sdk/jwt/jwt_verifier.py
from .jwt_header_content import JwtHeaderContent

# POSSIBILITY OF SUCH DAMAGE.


class JwtVerifier(object):
    """The JwtVerifier provides verification for Jwt."""

    def __init__(
            self,
            access_token_signer,
            api_public_key,
            api_public_key_id
    ):
        self._access_token_signer = access_token_signer
        self._api_public_key = api_public_key
        self._api_public_key_id = api_public_key_id

    def verify_token(self, jwt_token):
        # type: (Jwt) -> bool
        """
        To verify specified token.

        Args:
            jwt_token: An instance of Jwt to be verified.

        Returns:
            True if token is verified, otherwise False.
        """
        if jwt_token._header_content.key_id != self._api_public_key_id or\
           jwt_token._header_content.algorithm != self._access_token_signer.algorithm or\
           jwt_token._header_content.access_token_type != JwtHeaderContent.ACCESS_TOKEN_TYPE or\

           jwt_token._header_content.content_type != JwtHeaderContent.CONTENT_TYPE: