From d6264b9589864fce22320a67397a3dcd86e29c28 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Fri, 2 Jun 2017 23:06:46 -0700 Subject: [PATCH] [ENH] Reset old default token --- circle.yml | 4 ++-- dockereve-master/.env | 2 +- dockereve-master/eve-app/app.py | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index a3d2afa..2d16d05 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ dependencies: override: - - pip install docker-compose + - pip install docker-compose - pip install requests machine: @@ -8,7 +8,7 @@ machine: SECRET_KEY: CI MONGODB_HOST: mongodb MONGODB_PORT: 27017 - API_TOKEN: afaketoken + API_TOKEN: API_URL: "http://localhost/docs/api" services: - docker diff --git a/dockereve-master/.env b/dockereve-master/.env index 2bd1ee8..78ac731 100644 --- a/dockereve-master/.env +++ b/dockereve-master/.env @@ -1,5 +1,5 @@ MONGODB_HOST=mongodb MONGODB_PORT=27017 -API_TOKEN=afaketoken +API_TOKEN= API_URL=http://localhost/docs/api diff --git a/dockereve-master/eve-app/app.py b/dockereve-master/eve-app/app.py index 81c4f22..f13bc2b 100644 --- a/dockereve-master/eve-app/app.py +++ b/dockereve-master/eve-app/app.py @@ -9,9 +9,11 @@ from eve_swagger import swagger from settings import settings +API_TOKEN = os.environ.get("API_TOKEN") + class TokenAuth(TokenAuth): def check_auth(self, token, allowed_roles, resource, method): - return token == os.environ.get("API_TOKEN", '') + return token == API_TOKEN app = Eve(settings=settings, auth=TokenAuth) app.register_blueprint(swagger, url_prefix='/docs/api')