aboutsummaryrefslogtreecommitdiffstats
path: root/app/api/auth/auth.py
diff options
context:
space:
mode:
authorKoren Lev <korenlev@gmail.com>2017-09-29 01:38:18 +0300
committerYaron Yogev <yaronyogev@gmail.com>2017-10-03 09:46:58 +0000
commitd0adff06bed72f9a0edd7adccfa6a1111784bc8b (patch)
tree4b5eaf1107e6973b1eac636309a99c83074acbfc /app/api/auth/auth.py
parentfbbaf20912c79bd99a5c3696850d70c11965f56b (diff)
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2 Signed-off-by: Koren Lev <korenlev@gmail.com> (cherry picked from commit d32f75145676bacefde0d08a14680a5984623451)
Diffstat (limited to 'app/api/auth/auth.py')
-rw-r--r--app/api/auth/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/api/auth/auth.py b/app/api/auth/auth.py
index 04fc4b9..b7139f4 100644
--- a/app/api/auth/auth.py
+++ b/app/api/auth/auth.py
@@ -19,7 +19,7 @@ class Auth:
super().__init__()
self.inv = InventoryMgr()
self.log = FullLogger()
- self.tokens_coll = self.inv.client['tokens']['api_tokens']
+ self.tokens_coll = self.inv.collections['api_tokens']
self.ldap_access = LDAPAccess()
def get_token(self, token):
@@ -37,7 +37,7 @@ class Auth:
self.tokens_coll.insert_one(token)
except Exception as e:
self.log.error("Failed to write new token {0} to database for {1}"
- .format(token[token], str(e)))
+ .format(token['token'], str(e)))
error = 'Failed to create new token'
return error