Move realm config from server to auth

This commit is contained in:
Unrud 2018-08-16 08:00:01 +02:00
parent 6c12bba8a8
commit 6b281e1726
3 changed files with 9 additions and 9 deletions

6
config
View File

@ -48,9 +48,6 @@
# Reverse DNS to resolve client address in logs
#dns_lookup = True
# Message displayed in the client when a password is needed
#realm = Radicale - Password Required
[encoding]
@ -79,6 +76,9 @@
# Incorrect authentication delay (seconds)
#delay = 1
# Message displayed in the client when a password is needed
#realm = Radicale - Password Required
[rights]

View File

@ -355,7 +355,7 @@ class Application:
# Unknown or unauthorized user
logger.debug("Asking client for authentication")
status = client.UNAUTHORIZED
realm = self.configuration.get("server", "realm")
realm = self.configuration.get("auth", "realm")
headers = dict(headers)
headers.update({
"WWW-Authenticate":

View File

@ -101,11 +101,7 @@ INITIAL_CONFIG = OrderedDict([
("dns_lookup", {
"value": "True",
"help": "use reverse DNS to resolve client address in logs",
"type": bool}),
("realm", {
"value": "Radicale - Password Required",
"help": "message displayed when a password is needed",
"type": str})])),
"type": bool})])),
("encoding", OrderedDict([
("request", {
"value": "utf-8",
@ -129,6 +125,10 @@ INITIAL_CONFIG = OrderedDict([
"value": "bcrypt",
"help": "htpasswd encryption method",
"type": str}),
("realm", {
"value": "Radicale - Password Required",
"help": "message displayed when a password is needed",
"type": str}),
("delay", {
"value": "1",
"help": "incorrect authentication delay",