Possibility to protect some endpoints with basic-auth

user:passwd pair should be configured in restapi section of main
configuration file in following format:
restapi:
  auth: 'username:password'

Plus implemented some simple routing mechanisms:
GET /foo => do_GET_foo()
POST /bar => do_POST_bar()
This commit is contained in:
Alexander Kukushkin
2015-09-10 15:25:08 +02:00
parent e90b14cd3b
commit abcaf2b94a
5 changed files with 94 additions and 10 deletions
+1
View File
@@ -4,6 +4,7 @@ scope: &scope batman
restapi:
listen: 127.0.0.1:8008
connect_address: 127.0.0.1:8008
auth: 'username:password'
etcd:
scope: *scope
ttl: *ttl