Skip to content

Commit

Permalink
Fixed a problem with the payload signature
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarco76 committed Jun 10, 2015
1 parent e86205d commit 25d7fd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def user_authz():
app.logger.debug('URLEnc query string to return: %s', query_urlenc)
sig = hmac.new(
app.config.get('DISCOURSE_SECRET_KEY'),
query_urlenc,
query_b64,
hashlib.sha256
).hexdigest()
app.logger.debug('Signature: %s', sig)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def test_authentication_generation(self):
'mI1MjExZTU4YzAwZmYxMzk1ZjBjMGImbmFt'
'ZT1zYW0mdXNlcm5hbWU9%0Ac2Ftc2FtJmVt'
'YWlsPXRlc3QlNDB0ZXN0LmNvbSZleHRlcm5'
'hbF9pZD1oZWxsbzEyMw%3D%3D%0A&sig=b8'
'2864ea726a3fced213acf19c62296f79a64'
'cd7a04921c951dd7d05e2c0165e')
'hbF9pZD1oZWxsbzEyMw%3D%3D%0A&sig=52'
'92265340422c9ce2d528e25d2927a2e24b4'
'81c3e91fa353516ad458d312ffd')

def test_authentication_generation_with_full_name(self):
"""Test the authentication are properly send to Discourse"""
Expand All @@ -141,6 +141,6 @@ def test_authentication_generation_with_full_name(self):
'ZT1zYW0gYmlnJnVzZXJu%0AYW1lPXNhbWJp'
'Z19iNjQyJmVtYWlsPXRlc3QlNDB0ZXN0LmN'
'vbSZleHRlcm5hbF9pZD1oZWxsbzEy%0AMw%'
'3D%3D%0A&sig=12620fa583a8d03f17eb7b'
'dd52ef1e2ae25641b14b164e5621aea3762'
'0e00f06')
'3D%3D%0A&sig=2371c654bbfbc5b322340a'
'8fc61de880147ba00cba0fd6d29a751ad12'
'e87862b')

0 comments on commit 25d7fd7

Please sign in to comment.