From 9c849eb10a0be474b7a508b66a0db2519978d8be Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 13 Oct 2018 17:22:21 +0100 Subject: [PATCH] WebServer - change /login-basic route to /login/basic To avoid clashing with tiddlers called "login-basic" :) We also need to revise the rout for /status for the same reason, but there are backward compatibility issues there --- core/modules/server/routes/get-login-basic.js | 6 +++--- .../WebServer API_ Force Basic Authentication Login.tid | 2 +- .../tiddlers/webserver/WebServer Basic Authentication.tid | 2 +- editions/tw5.com/tiddlers/webserver/WebServer.tid | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/modules/server/routes/get-login-basic.js b/core/modules/server/routes/get-login-basic.js index c3cb16eb6..914fb624b 100644 --- a/core/modules/server/routes/get-login-basic.js +++ b/core/modules/server/routes/get-login-basic.js @@ -1,9 +1,9 @@ /*\ -title: $:/core/modules/server/routes/get-login-basic.js +title: $:/core/modules/server/routes/get-login/basic.js type: application/javascript module-type: route -GET /login-basic -- force a Basic Authentication challenge +GET /login/basic -- force a Basic Authentication challenge \*/ (function() { @@ -14,7 +14,7 @@ GET /login-basic -- force a Basic Authentication challenge exports.method = "GET"; -exports.path = /^\/login-basic$/; +exports.path = /^\/login\/basic$/; exports.handler = function(request,response,state) { if(!state.authenticatedUsername) { diff --git a/editions/tw5.com/tiddlers/webserver/WebServer API_ Force Basic Authentication Login.tid b/editions/tw5.com/tiddlers/webserver/WebServer API_ Force Basic Authentication Login.tid index 356213ac8..cec24f2a7 100644 --- a/editions/tw5.com/tiddlers/webserver/WebServer API_ Force Basic Authentication Login.tid +++ b/editions/tw5.com/tiddlers/webserver/WebServer API_ Force Basic Authentication Login.tid @@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki Forces the server to request basic authentication login, and then redirects to the root ``` -GET /login-basic +GET /login/basic ``` Requests an basic authentication from the browser, and redirects to the root if successful. diff --git a/editions/tw5.com/tiddlers/webserver/WebServer Basic Authentication.tid b/editions/tw5.com/tiddlers/webserver/WebServer Basic Authentication.tid index e65f391fe..cc6fc1816 100644 --- a/editions/tw5.com/tiddlers/webserver/WebServer Basic Authentication.tid +++ b/editions/tw5.com/tiddlers/webserver/WebServer Basic Authentication.tid @@ -8,4 +8,4 @@ type: text/vnd.tiddlywiki Basic authentication is activated if credentials are specified via the [[username|WebServer Parameter: username]]/[[password|WebServer Parameter: password]] or [[credentials|WebServer Parameter: credentials]] parameters. -If [[WebServer Authorization]] is configured to allow access by both anonymous and authenticated users then by default users will not be prompted for credentials, and will be given anonymous access. To force a password prompt visit the route `/login-basic` (for example, http://127.0.0.1:8080/login-basic). +If [[WebServer Authorization]] is configured to allow access by both anonymous and authenticated users then by default users will not be prompted for credentials, and will be given anonymous access. To force a password prompt visit the route `/login/basic` (for example, http://127.0.0.1:8080/login/basic). diff --git a/editions/tw5.com/tiddlers/webserver/WebServer.tid b/editions/tw5.com/tiddlers/webserver/WebServer.tid index 031dfefb1..ef777900b 100644 --- a/editions/tw5.com/tiddlers/webserver/WebServer.tid +++ b/editions/tw5.com/tiddlers/webserver/WebServer.tid @@ -43,7 +43,7 @@ Visiting the wiki will prompt for a username and password, and access is denied This example adds the [[authorization|WebServer Authorization]] parameters [[readers|WebServer Parameter: readers]] and [[writers|WebServer Parameter: writers]] to grant read access to anonymous users, but require authentication as "joe" in order to gain write access. -> Note that anonymous users can trigger a username/password prompt by visiting the route `\login-basic` (eg http://127.0.0.1:8080/login-basic). +> Note that anonymous users can trigger a username/password prompt by visiting the route `\login/basic` (eg http://127.0.0.1:8080/login/basic). ``` tiddlywiki mywikifolder --listen "readers=(anon)" writers=joe username=joe password=bloggs