Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #406 from dhermes/fix-405
Browse files Browse the repository at this point in the history
Fixing bug where '=' was stripped from signed bytes.
  • Loading branch information
nathanielmanistaatgoogle committed Feb 13, 2016
2 parents b13ab40 + dc31ec4 commit 5010a4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oauth2client/crypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def make_signed_jwt(signer, payload, key_id=None):
header['kid'] = key_id

segments = [
_urlsafe_b64encode(_json_encode(header)),
_urlsafe_b64encode(_json_encode(payload)),
_urlsafe_b64encode(_json_encode(header)),
_urlsafe_b64encode(_json_encode(payload)),
]
signing_input = b'.'.join(segments)

signature = signer.sign(signing_input).rstrip(b'=')
signature = signer.sign(signing_input)
segments.append(_urlsafe_b64encode(signature))

logger.debug(str(segments))
Expand Down

0 comments on commit 5010a4b

Please sign in to comment.