Skip to content

Commit

Permalink
Use HS256 alg for callback url (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
dispensable authored Jun 18, 2020
1 parent fac3842 commit 98618a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpdesk/models/db/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def generate_callback_url(self):
"""
# todo: replace hardcode with url_path current url_path not working somehow
callback_url = f'api/ticket/mark/{self.id}'
jwt_token = jwt.encode({'alg': 'RS256'}, {'ticket_id': self.id, 'op': 'mark'}, SESSION_SECRET_KEY)
jwt_token = jwt.encode({'alg': 'HS256'}, {'ticket_id': self.id, 'op': 'mark'}, SESSION_SECRET_KEY)
callback_url_payload = {"token": jwt_token}
return f"{DEFAULT_BASE_URL}/{callback_url}?{urlencode(callback_url_payload, quote_via=quote_plus)}"

Expand Down

0 comments on commit 98618a1

Please sign in to comment.