Use equality instead of in
This commit is contained in:
parent
1ce2cfc3e3
commit
7889bd88e3
|
@ -83,7 +83,7 @@ def authenticator(function):
|
||||||
return function(*args, **kwargs)
|
return function(*args, **kwargs)
|
||||||
# Direct token-based authentication
|
# Direct token-based authentication
|
||||||
if 'token' in flask.request.values:
|
if 'token' in flask.request.values:
|
||||||
if any(token for token in config['auth_tokens'] if flask.request.values['token'] in token['token']):
|
if any(found_token for token in config['auth_tokens'] if flask.request.values['token'] == token['token']):
|
||||||
return function(*args, **kwargs)
|
return function(*args, **kwargs)
|
||||||
else:
|
else:
|
||||||
return flask.jsonify({"message":"Authentication failed"}), 401
|
return flask.jsonify({"message":"Authentication failed"}), 401
|
||||||
|
|
Loading…
Reference in New Issue