Skip to content

Commit 482ab76

Browse files
author
Daniel Hermes
committed
Changing prn (for service account assertions) to sub, per specification change.
Reviewed in https://codereview.appspot.com/7791043/
1 parent 14eb973 commit 482ab76

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

oauth2client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def __init__(self,
925925
defaults to Google's endpoints but any OAuth 2.0 provider can be used.
926926
revoke_uri: string, URI for revoke endpoint.
927927
kwargs: kwargs, Additional parameters to add to the JWT token, for
928-
example prn=joe@xample.org."""
928+
example sub=joe@xample.org."""
929929

930930
super(SignedJwtAssertionCredentials, self).__init__(
931931
None,

tests/test_oauth2client_jwt.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_credentials_good(self):
217217
'some_account@example.com',
218218
private_key,
219219
scope='read+write',
220-
prn='joe@example.org')
220+
sub='joe@example.org')
221221
http = HttpMockSequence([
222222
({'status': '200'}, '{"access_token":"1/3w","expires_in":3600}'),
223223
({'status': '200'}, 'echo_request_headers'),
@@ -232,7 +232,7 @@ def test_credentials_to_from_json(self):
232232
'some_account@example.com',
233233
private_key,
234234
scope='read+write',
235-
prn='joe@example.org')
235+
sub='joe@example.org')
236236
json = credentials.to_json()
237237
restored = Credentials.new_from_json(json)
238238
self.assertEqual(credentials.private_key, restored.private_key)
@@ -257,7 +257,7 @@ def test_credentials_refresh_without_storage(self):
257257
'some_account@example.com',
258258
private_key,
259259
scope='read+write',
260-
prn='joe@example.org')
260+
sub='joe@example.org')
261261

262262
content = self._credentials_refresh(credentials)
263263

@@ -269,7 +269,7 @@ def test_credentials_refresh_with_storage(self):
269269
'some_account@example.com',
270270
private_key,
271271
scope='read+write',
272-
prn='joe@example.org')
272+
sub='joe@example.org')
273273

274274
(filehandle, filename) = tempfile.mkstemp()
275275
os.close(filehandle)
@@ -305,7 +305,7 @@ def test_for_failure(self):
305305
'some_account@example.com',
306306
private_key,
307307
scope='read+write',
308-
prn='joe@example.org')
308+
sub='joe@example.org')
309309
try:
310310
credentials._generate_assertion()
311311
self.fail()

0 commit comments

Comments
 (0)