Update grant_type for AssertionCredentials.

Reviewed in https://codereview.appspot.com/7300056/.
This commit is contained in:
Joe Gregorio
2013-02-07 10:52:26 -05:00
parent a9eb0bb68f
commit cdc350fbb1
2 changed files with 3 additions and 1 deletions

View File

@@ -854,7 +854,7 @@ class AssertionCredentials(OAuth2Credentials):
body = urllib.urlencode({
'assertion_type': self.assertion_type,
'assertion': assertion,
'grant_type': 'assertion',
'grant_type': 'urn:ietf:params:oauth:grant-type:jwt-bearer',
})
return body

View File

@@ -289,6 +289,8 @@ class TestAssertionCredentials(unittest.TestCase):
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])
def test_assertion_refresh(self):
http = HttpMockSequence([