Fix some trivial issues.
This commit is contained in:
@@ -1396,7 +1396,7 @@ class SignedJwtAssertionCredentials(AssertionCredentials):
|
||||
|
||||
def _generate_assertion(self):
|
||||
"""Generate the assertion that will be used in the request."""
|
||||
now = long(time.time())
|
||||
now = int(time.time())
|
||||
payload = {
|
||||
'aud': self.token_uri,
|
||||
'scope': self.scope,
|
||||
|
||||
@@ -191,8 +191,10 @@ try:
|
||||
Verifier instance.
|
||||
"""
|
||||
if is_x509_cert:
|
||||
pemLines = key_pem.replace(' ', '').split()
|
||||
certDer = _urlsafe_b64decode(''.join(pemLines[1:-1]))
|
||||
if isinstance(key_pem, six.text_type):
|
||||
key_pem = key_pem.encode('ascii')
|
||||
pemLines = key_pem.replace(b' ', b'').split()
|
||||
certDer = _urlsafe_b64decode(b''.join(pemLines[1:-1]))
|
||||
certSeq = DerSequence()
|
||||
certSeq.decode(certDer)
|
||||
tbsSeq = DerSequence()
|
||||
|
||||
@@ -28,7 +28,7 @@ import tempfile
|
||||
import time
|
||||
import unittest
|
||||
|
||||
from http_mock import HttpMockSequence
|
||||
from .http_mock import HttpMockSequence
|
||||
from oauth2client import crypt
|
||||
from oauth2client.client import Credentials
|
||||
from oauth2client.client import SignedJwtAssertionCredentials
|
||||
|
||||
Reference in New Issue
Block a user