mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
Refactor ApiKeys.secret and ServiceInboundApi.bearer_token to use the same encryption method and get rid of the duplicate code.
This commit is contained in:
@@ -741,5 +741,5 @@ def test_get_notification_selects_correct_template_for_personalisation(client,
|
||||
|
||||
|
||||
def _create_auth_header_from_key(api_key):
|
||||
token = create_jwt_token(secret=api_key.unsigned_secret, client_id=str(api_key.service_id))
|
||||
token = create_jwt_token(secret=api_key.secret, client_id=str(api_key.service_id))
|
||||
return [('Authorization', 'Bearer {}'.format(token))]
|
||||
|
||||
Reference in New Issue
Block a user