aboutsummaryrefslogtreecommitdiff
path: root/google/auth/crypt/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'google/auth/crypt/base.py')
-rw-r--r--google/auth/crypt/base.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/google/auth/crypt/base.py b/google/auth/crypt/base.py
index 0bda9c3..c98d5bf 100644
--- a/google/auth/crypt/base.py
+++ b/google/auth/crypt/base.py
@@ -18,12 +18,15 @@ import abc
import io
import json
+import six
+
_JSON_FILE_PRIVATE_KEY = "private_key"
_JSON_FILE_PRIVATE_KEY_ID = "private_key_id"
-class Verifier(object, metaclass=abc.ABCMeta):
+@six.add_metaclass(abc.ABCMeta)
+class Verifier(object):
"""Abstract base class for crytographic signature verifiers."""
@abc.abstractmethod
@@ -43,7 +46,8 @@ class Verifier(object, metaclass=abc.ABCMeta):
raise NotImplementedError("Verify must be implemented")
-class Signer(object, metaclass=abc.ABCMeta):
+@six.add_metaclass(abc.ABCMeta)
+class Signer(object):
"""Abstract base class for cryptographic signers."""
@abc.abstractproperty
@@ -66,7 +70,8 @@ class Signer(object, metaclass=abc.ABCMeta):
raise NotImplementedError("Sign must be implemented")
-class FromServiceAccountMixin(object, metaclass=abc.ABCMeta):
+@six.add_metaclass(abc.ABCMeta)
+class FromServiceAccountMixin(object):
"""Mix-in to enable factory constructors for a Signer."""
@abc.abstractmethod