From d856081483919e3ed66ca6277ec5de52eeda8e2d Mon Sep 17 00:00:00 2001 From: Jakob Schrettenbrunner Date: Thu, 6 Jul 2017 20:49:50 +0200 Subject: [PATCH] add test files for auth middleware --- api/_testdata/config.json | 5 +++++ api/_testdata/servers/existingserver.json | 14 ++++++++++++++ config.example.json | 5 ++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 api/_testdata/config.json create mode 100644 api/_testdata/servers/existingserver.json diff --git a/api/_testdata/config.json b/api/_testdata/config.json new file mode 100644 index 0000000..327c993 --- /dev/null +++ b/api/_testdata/config.json @@ -0,0 +1,5 @@ +{ + "authKeys": [ + "existingkey" + ] +} diff --git a/api/_testdata/servers/existingserver.json b/api/_testdata/servers/existingserver.json new file mode 100644 index 0000000..10175c4 --- /dev/null +++ b/api/_testdata/servers/existingserver.json @@ -0,0 +1,14 @@ +{ + "uuid": "existingserver", + "keys": { + "existinggkey": [ + "g:*" + ], + "existingspecificskey": [ + "s:test" + ], + "existingglobalskey": [ + "s:*" + ] + } +} diff --git a/config.example.json b/config.example.json index 852c408..046abab 100644 --- a/config.example.json +++ b/config.example.json @@ -32,5 +32,8 @@ "path": "logs/", "level": "info", "deleteAfterDays": 100 - } + }, + "authKeys": [ + "somekey" + ] }