mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
webaccess: Return 401 for authn failure, 403 for authz failure
This makes it possible for reverse proxies to transform 403 errors into something like "upgrade to a premium account to access this pad". Also add some webaccess tests.
This commit is contained in:
parent
ff4da04907
commit
53fd0b4f98
4 changed files with 188 additions and 17 deletions
|
@ -370,7 +370,8 @@ A plugin's authFailure function is only called if all of the following are true:
|
|||
Calling the provided callback with `[true]` tells Etherpad that the failure was
|
||||
handled and no further error handling is required. Calling the callback with
|
||||
`[]` or `undefined` defers error handling to the next authFailure plugin (if
|
||||
any, otherwise fall back to HTTP basic authentication).
|
||||
any, otherwise fall back to HTTP basic authentication for an authentication
|
||||
failure or a generic 403 page for an authorization failure).
|
||||
|
||||
Example:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue