1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

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
This commit is contained in:
Jermolene 2018-10-13 17:22:21 +01:00
parent d8007386cf
commit 9c849eb10a
4 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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.

View File

@ -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).

View File

@ -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