mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Merge pull request #275 from alphagov/fix-auth-bug
This pull request fixes a bug in authentication.
This commit is contained in:
@@ -48,6 +48,8 @@ def requires_auth():
|
||||
except TokenDecodeError:
|
||||
errors_resp = authentication_response("Invalid token: signature", 403)
|
||||
|
||||
if not api_client['secret']:
|
||||
errors_resp = authentication_response("Invalid token: signature", 403)
|
||||
return errors_resp
|
||||
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ def process_job(job_id):
|
||||
if template.template_type == 'sms':
|
||||
send_sms.apply_async((
|
||||
str(job.service_id),
|
||||
str(create_uuid()),
|
||||
create_uuid(),
|
||||
encrypted,
|
||||
datetime.utcnow().strftime(DATETIME_FORMAT)),
|
||||
queue='bulk-sms'
|
||||
@@ -171,7 +171,7 @@ def process_job(job_id):
|
||||
if template.template_type == 'email':
|
||||
send_email.apply_async((
|
||||
str(job.service_id),
|
||||
str(create_uuid()),
|
||||
create_uuid(),
|
||||
'"{}" <{}@{}>'.format(
|
||||
service.name,
|
||||
service.email_from,
|
||||
|
||||
Reference in New Issue
Block a user