From 482ab7679ea6db6a34f3d84397862185acbf7579 Mon Sep 17 00:00:00 2001 From: Daniel Hermes Date: Wed, 13 Mar 2013 13:37:27 -0700 Subject: [PATCH] Changing prn (for service account assertions) to sub, per specification change. Reviewed in https://codereview.appspot.com/7791043/ --- oauth2client/client.py | 2 +- tests/test_oauth2client_jwt.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/oauth2client/client.py b/oauth2client/client.py index 6b580a0..4e8e616 100644 --- a/oauth2client/client.py +++ b/oauth2client/client.py @@ -925,7 +925,7 @@ if HAS_CRYPTO: defaults to Google's endpoints but any OAuth 2.0 provider can be used. revoke_uri: string, URI for revoke endpoint. kwargs: kwargs, Additional parameters to add to the JWT token, for - example prn=joe@xample.org.""" + example sub=joe@xample.org.""" super(SignedJwtAssertionCredentials, self).__init__( None, diff --git a/tests/test_oauth2client_jwt.py b/tests/test_oauth2client_jwt.py index 0016153..4af0030 100644 --- a/tests/test_oauth2client_jwt.py +++ b/tests/test_oauth2client_jwt.py @@ -217,7 +217,7 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase): 'some_account@example.com', private_key, scope='read+write', - prn='joe@example.org') + sub='joe@example.org') http = HttpMockSequence([ ({'status': '200'}, '{"access_token":"1/3w","expires_in":3600}'), ({'status': '200'}, 'echo_request_headers'), @@ -232,7 +232,7 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase): 'some_account@example.com', private_key, scope='read+write', - prn='joe@example.org') + sub='joe@example.org') json = credentials.to_json() restored = Credentials.new_from_json(json) self.assertEqual(credentials.private_key, restored.private_key) @@ -257,7 +257,7 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase): 'some_account@example.com', private_key, scope='read+write', - prn='joe@example.org') + sub='joe@example.org') content = self._credentials_refresh(credentials) @@ -269,7 +269,7 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase): 'some_account@example.com', private_key, scope='read+write', - prn='joe@example.org') + sub='joe@example.org') (filehandle, filename) = tempfile.mkstemp() os.close(filehandle) @@ -305,7 +305,7 @@ class PKCSSignedJwtAssertionCredentialsPyCryptoTests(unittest.TestCase): 'some_account@example.com', private_key, scope='read+write', - prn='joe@example.org') + sub='joe@example.org') try: credentials._generate_assertion() self.fail()