Add explicit config parameter to the JWT auth methods
This commit is contained in:
parent
460137779f
commit
6ae3faf7fc
5 changed files with 16 additions and 17 deletions
|
@ -1,12 +1,12 @@
|
|||
import logging
|
||||
import urllib
|
||||
from urlparse import urlparse, parse_qs
|
||||
from util.security.registry_jwt import (generate_bearer_token, decode_bearer_token,
|
||||
InvalidBearerTokenException)
|
||||
|
||||
from urlparse import urlparse
|
||||
from flask import abort, request
|
||||
from jsonschema import validate, ValidationError
|
||||
|
||||
import logging
|
||||
from util.security.registry_jwt import (generate_bearer_token, decode_bearer_token,
|
||||
InvalidBearerTokenException)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -126,7 +126,7 @@ class DownloadProxy(object):
|
|||
|
||||
# Decode the bearer token.
|
||||
try:
|
||||
decoded = decode_bearer_token(token, self.instance_keys)
|
||||
decoded = decode_bearer_token(token, self.instance_keys, self.app.config)
|
||||
except InvalidBearerTokenException:
|
||||
logger.exception('Invalid token for storage proxy')
|
||||
abort(401)
|
||||
|
|
Reference in a new issue