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:
parent
d8007386cf
commit
9c849eb10a
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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).
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user