mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-17 13:09:58 -04:00
Merge pull request #3286 from alphagov/bump-utils-fix-placeholder-bug
Bump utils to bring in fix for optional placeholder bug
This commit is contained in:
@@ -7,7 +7,6 @@ from time import monotonic
|
||||
|
||||
from celery import current_task
|
||||
from flask import (
|
||||
_request_ctx_stack,
|
||||
current_app,
|
||||
g,
|
||||
has_request_context,
|
||||
@@ -69,8 +68,8 @@ metrics = GDSMetrics()
|
||||
|
||||
notification_provider_clients = NotificationProviderClients()
|
||||
|
||||
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
|
||||
authenticated_service = LocalProxy(lambda: _request_ctx_stack.top.authenticated_service)
|
||||
api_user = LocalProxy(lambda: g.api_user)
|
||||
authenticated_service = LocalProxy(lambda: g.authenticated_service)
|
||||
|
||||
CONCURRENT_REQUESTS = Gauge(
|
||||
'concurrent_web_request_count',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import uuid
|
||||
|
||||
from flask import _request_ctx_stack, current_app, g, request
|
||||
from flask import current_app, g, request
|
||||
from gds_metrics import Histogram
|
||||
from notifications_python_client.authentication import (
|
||||
decode_jwt_token,
|
||||
@@ -140,8 +140,8 @@ def requires_auth():
|
||||
raise AuthError("Invalid token: API key revoked", 403, service_id=service.id, api_key_id=api_key.id)
|
||||
|
||||
g.service_id = service.id
|
||||
_request_ctx_stack.top.authenticated_service = service
|
||||
_request_ctx_stack.top.api_user = api_key
|
||||
g.api_user = api_key
|
||||
g.authenticated_service = service
|
||||
|
||||
current_app.logger.info('API authorised for service {} with api key {}, using issuer {} for URL: {}'.format(
|
||||
service.id,
|
||||
|
||||
Reference in New Issue
Block a user