Remove 'assertion_type' from _generate_refresh_request_body. Fixes Issue 238.

Reviewed in https://codereview.appspot.com/7308075/
This commit is contained in:
dhermes@google.com
2013-02-11 08:42:18 -08:00
parent 78787b61b9
commit 2cc09387e8
4 changed files with 5 additions and 9 deletions

View File

@@ -160,9 +160,8 @@ class AppAssertionCredentials(AssertionCredentials):
"""
self.scope = util.scopes_to_string(scope)
super(AppAssertionCredentials, self).__init__(
'ignored' # assertion_type is ignore in this subclass.
)
# Assertion type is no longer used, but still in the parent class signature.
super(AppAssertionCredentials, self).__init__(None)
@classmethod
def from_json(cls, json):

View File

@@ -852,7 +852,6 @@ class AssertionCredentials(OAuth2Credentials):
assertion = self._generate_assertion()
body = urllib.urlencode({
'assertion_type': self.assertion_type,
'assertion': assertion,
'grant_type': 'urn:ietf:params:oauth:grant-type:jwt-bearer',
})
@@ -920,7 +919,7 @@ if HAS_CRYPTO:
example prn=joe@xample.org."""
super(SignedJwtAssertionCredentials, self).__init__(
'http://oauth.net/grant_type/jwt/1.0/bearer',
None,
user_agent=user_agent,
token_uri=token_uri,
revoke_uri=revoke_uri,

View File

@@ -58,9 +58,8 @@ class AppAssertionCredentials(AssertionCredentials):
"""
self.scope = util.scopes_to_string(scope)
super(AppAssertionCredentials, self).__init__(
'ignored' # assertion_type is ignore in this subclass.
)
# Assertion type is no longer used, but still in the parent class signature.
super(AppAssertionCredentials, self).__init__(None)
@classmethod
def from_json(cls, json):

View File

@@ -288,7 +288,6 @@ class TestAssertionCredentials(unittest.TestCase):
def test_assertion_body(self):
body = urlparse.parse_qs(self.credentials._generate_refresh_request_body())
self.assertEqual(self.assertion_text, body['assertion'][0])
self.assertEqual(self.assertion_type, body['assertion_type'][0])
self.assertEqual('urn:ietf:params:oauth:grant-type:jwt-bearer',
body['grant_type'][0])