# Path: virgil_sdk/utils/utils.py
# class Utils(object):
# 
#     @staticmethod
#     def b64_decode(source):
#         """Decode base64, padding being optional.
# 
#         Args:
#             source: Base64 data as an ASCII byte string
# 
#         Returns:
#             The decoded byte string.
# 
#         """
#         try:
#             if isinstance(source, bytes):
#                 return base64.urlsafe_b64decode(source)
#             return base64.urlsafe_b64decode(bytearray(source, "utf-8"))
#         except (binascii.Error, TypeError) as e:
#             missing_padding = len(source) % 4
#             if missing_padding != 0:
#                 if isinstance(source, str) or check_unicode(source):
#                     source += '=' * (4 - missing_padding)
#                 if isinstance(source, bytes) or isinstance(source, bytearray):
#                     source += b'=' * (4 - missing_padding)
#             if isinstance(source, bytes):
#                 return base64.urlsafe_b64decode(source)
#             return base64.urlsafe_b64decode(bytearray(source, "utf-8"))
# 
#     @staticmethod
#     def b64_encode(source):
#         """
#         Removes any `=` used as padding from the encoded string.
# 
#         Args:
#             Data for encoding.
# 
#         Returns:
#             Encoded data without '=' sign
#         """
#         if isinstance(source, bytes):
#             encoded = base64.urlsafe_b64encode(source)
#         else:
#             encoded = base64.urlsafe_b64encode(bytearray(source, "utf-8"))
#         return bytearray(encoded).decode().rstrip("=")
# 
#     @staticmethod
#     def strtobytes(source):
#         # type: (str) -> Tuple[*int]
#         """Convert string to bytes tuple used for all crypto methods."""
#         return tuple(bytearray(source))
# 
#     @classmethod
#     def b64tobytes(cls, source):
#         # type: (str) -> Tuple[*int]
#         """Convert source to bytearray and encode using base64."""
#         return cls.strtobytes(cls.b64decode(source))
# 
#     @staticmethod
#     def b64encode(source):
#         # type: (Union[str, bytes]) -> str
#         """Convert source to bytearray and encode using base64."""
#         return base64.b64encode(bytearray(source)).decode("utf-8", "ignore")
# 
#     @staticmethod
#     def b64decode(source):
#         # type: (Union[str, bytes]) -> str
#         """Convert source to bytearray and decode using base64."""
#         if isinstance(source, bytes):
#             return base64.b64decode(source)
#         return base64.b64decode(bytearray(source, "utf-8"))
# 
#     @staticmethod
#     def json_loads(source):
#         # type: (Union[str, bytes, bytearray]) -> dict
#         """Convert source to bytearray and deserialize from json to python dict object."""
#         if isinstance(source, bytes):
#             return json.loads(bytearray(source).decode())
#         return json.loads(bytearray(source, "utf-8").decode())
# 
#     @staticmethod
#     def json_dumps(source, *args, **kwargs):
#         # type: (object) -> str
#         """Convert python dict to json string"""
#         return json.dumps(source, *args, **kwargs)
# 
#     @staticmethod
#     def to_timestamp(date):
#         # type: (datetime) -> Union[int, str]
#         epoch = datetime.datetime(1970, 1, 1)
#         return int((date - epoch).total_seconds())
# 
#     @staticmethod
#     def raise_from(exception):
#         """Supress long traceback for custom exceptions Python 3, show only important exception."""
#         exception.__cause__ = None
#         raise exception
# 
#     @staticmethod
#     def normalize_string(source):
#         return normalize_string(source)
# 
#     @staticmethod
#     def check_unicode(source):
#         return check_unicode(source)


import datetime
from collections import OrderedDict
from virgil_sdk.utils import Utils

    @property
    def subject_prefix(self):
        return self.__SUBJECT_PREFIX

    @property
    def identity_prefix(self):
        return self.__IDENTITY_PREFIX

    @property
    def issuer(self):
        """Jwt issuer."""
        return self._issuer

    @property
    def issued_at(self):
        """Jwt issued at"""
        return self._issued_at

    @property
    def issued_at_timestamp(self):
        return Utils.to_timestamp(self._issued_at)

    @property
    def expires_at(self):
        """When jwt expire."""
        return self._expires_at

    @property
    def expires_at_timestamp(self):

# Path: virgil_sdk/utils/utils.py
# class Utils(object):
# 
#     @staticmethod
#     def b64_decode(source):
#         """Decode base64, padding being optional.
# 
#         Args:
#             source: Base64 data as an ASCII byte string
# 
#         Returns:
#             The decoded byte string.
# 
#         """
#         try:
#             if isinstance(source, bytes):
#                 return base64.urlsafe_b64decode(source)
#             return base64.urlsafe_b64decode(bytearray(source, "utf-8"))
#         except (binascii.Error, TypeError) as e:
#             missing_padding = len(source) % 4
#             if missing_padding != 0:
#                 if isinstance(source, str) or check_unicode(source):
#                     source += '=' * (4 - missing_padding)
#                 if isinstance(source, bytes) or isinstance(source, bytearray):
#                     source += b'=' * (4 - missing_padding)
#             if isinstance(source, bytes):
#                 return base64.urlsafe_b64decode(source)
#             return base64.urlsafe_b64decode(bytearray(source, "utf-8"))
# 
#     @staticmethod
#     def b64_encode(source):
#         """
#         Removes any `=` used as padding from the encoded string.
# 
#         Args:
#             Data for encoding.
# 
#         Returns:
#             Encoded data without '=' sign
#         """
#         if isinstance(source, bytes):
#             encoded = base64.urlsafe_b64encode(source)
#         else:
#             encoded = base64.urlsafe_b64encode(bytearray(source, "utf-8"))
#         return bytearray(encoded).decode().rstrip("=")
# 
#     @staticmethod
#     def strtobytes(source):
#         # type: (str) -> Tuple[*int]
#         """Convert string to bytes tuple used for all crypto methods."""
#         return tuple(bytearray(source))
# 
#     @classmethod
#     def b64tobytes(cls, source):
#         # type: (str) -> Tuple[*int]
#         """Convert source to bytearray and encode using base64."""
#         return cls.strtobytes(cls.b64decode(source))
# 
#     @staticmethod
#     def b64encode(source):
#         # type: (Union[str, bytes]) -> str
#         """Convert source to bytearray and encode using base64."""
#         return base64.b64encode(bytearray(source)).decode("utf-8", "ignore")
# 
#     @staticmethod
#     def b64decode(source):
#         # type: (Union[str, bytes]) -> str
#         """Convert source to bytearray and decode using base64."""
#         if isinstance(source, bytes):
#             return base64.b64decode(source)
#         return base64.b64decode(bytearray(source, "utf-8"))
# 
#     @staticmethod
#     def json_loads(source):
#         # type: (Union[str, bytes, bytearray]) -> dict
#         """Convert source to bytearray and deserialize from json to python dict object."""
#         if isinstance(source, bytes):
#             return json.loads(bytearray(source).decode())
#         return json.loads(bytearray(source, "utf-8").decode())
# 
#     @staticmethod
#     def json_dumps(source, *args, **kwargs):
#         # type: (object) -> str
#         """Convert python dict to json string"""
#         return json.dumps(source, *args, **kwargs)
# 
#     @staticmethod
#     def to_timestamp(date):
#         # type: (datetime) -> Union[int, str]
#         epoch = datetime.datetime(1970, 1, 1)
#         return int((date - epoch).total_seconds())
# 
#     @staticmethod
#     def raise_from(exception):
#         """Supress long traceback for custom exceptions Python 3, show only important exception."""
#         exception.__cause__ = None
#         raise exception
# 
#     @staticmethod
#     def normalize_string(source):
#         return normalize_string(source)
# 
#     @staticmethod
#     def check_unicode(source):
#         return check_unicode(source)


# Path: virgil_sdk/jwt/jwt_body_content.py
import datetime
from collections import OrderedDict
from virgil_sdk.utils import Utils


    @property
    def subject_prefix(self):
        return self.__SUBJECT_PREFIX

    @property
    def identity_prefix(self):
        return self.__IDENTITY_PREFIX

    @property
    def issuer(self):
        """Jwt issuer."""
        return self._issuer

    @property
    def issued_at(self):
        """Jwt issued at"""
        return self._issued_at

    @property
    def issued_at_timestamp(self):
        return Utils.to_timestamp(self._issued_at)

    @property
    def expires_at(self):
        """When jwt expire."""
        return self._expires_at

    @property
    def expires_at_timestamp(self):

        return Utils.to_timestamp(self.expires_at)