1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Fix basic authentication forced login

Fixes #3647
This commit is contained in:
Jermolene 2018-12-16 18:20:33 +00:00
parent f71a3b72d7
commit 42cf077639
4 changed files with 9 additions and 9 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

@ -1,5 +1,5 @@
created: 20181002124825195
modified: 20181002125214104
modified: 20181216181934282
tags: [[WebServer API]]
title: WebServer API: Force Basic Authentication Login
type: text/vnd.tiddlywiki
@ -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

@ -1,5 +1,5 @@
created: 20180701175133376
modified: 20180702132942777
modified: 20181216181934282
tags: [[WebServer Authentication]]
title: WebServer Basic Authentication
type: text/vnd.tiddlywiki
@ -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

@ -1,5 +1,5 @@
created: 20180626150526207
modified: 20181107173250253
modified: 20181216181934282
tags: ListenCommand ServerCommand Features
title: WebServer
type: text/vnd.tiddlywiki
@ -45,7 +45,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