summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-10-11 01:04:29 +0300
committerDevaev Maxim <[email protected]>2019-10-11 01:04:29 +0300
commit958c113c2f24d1f6c093cab3b56bd6e22640e47b (patch)
tree0c036031ccf540e62594fd536780e6c12bb948dc /kvmd/plugins
parent0fd333d73b21e40e52e973682e077c64c8796a88 (diff)
added secret for http auth
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/auth/http.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py
index 69548516..a79e327d 100644
--- a/kvmd/plugins/auth/http.py
+++ b/kvmd/plugins/auth/http.py
@@ -46,6 +46,7 @@ class Plugin(BaseAuthService):
self,
url: str,
verify: bool,
+ secret: str,
user: str,
passwd: str,
timeout: float,
@@ -53,6 +54,7 @@ class Plugin(BaseAuthService):
self.__url = url
self.__verify = verify
+ self.__secret = secret
self.__user = user
self.__passwd = passwd
self.__timeout = timeout
@@ -64,6 +66,7 @@ class Plugin(BaseAuthService):
return {
"url": Option("http://localhost/auth"),
"verify": Option(True, type=valid_bool),
+ "secret": Option(""),
"user": Option(""),
"passwd": Option(""),
"timeout": Option(5.0, type=valid_float_f01),
@@ -79,6 +82,7 @@ class Plugin(BaseAuthService):
json={
"user": user,
"passwd": passwd,
+ "secret": self.__secret,
},
headers={
"User-Agent": f"KVMD/{__version__}",