summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/caddyauth
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2020-11-26 22:31:25 -0500
committerGitHub <noreply@github.com>2020-11-26 22:31:25 -0500
commit4afcdc49d14855c0c3a4fd4558d0f81906db3ffb (patch)
treeff5083fdb42c1721669b0c337fce1ab3733f523a /modules/caddyhttp/caddyauth
parent7d7434c9ce9778adf7b7ff6c3a6575ea1c11ed01 (diff)
docs: Mention {http.auth.user.id} placeholder in basicauth JSON docs (#3886)
Diffstat (limited to 'modules/caddyhttp/caddyauth')
-rw-r--r--modules/caddyhttp/caddyauth/caddyauth.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddyhttp/caddyauth/caddyauth.go b/modules/caddyhttp/caddyauth/caddyauth.go
index a88bff6..3a0a2a0 100644
--- a/modules/caddyhttp/caddyauth/caddyauth.go
+++ b/modules/caddyhttp/caddyauth/caddyauth.go
@@ -30,6 +30,11 @@ func init() {
// Authentication is a middleware which provides user authentication.
// Rejects requests with HTTP 401 if the request is not authenticated.
//
+// After a successful authentication, the placeholder
+// `{http.auth.user.id}` will be set to the username, and also
+// `{http.auth.user.*}` placeholders may be set for any authentication
+// modules that provide user metadata.
+//
// Its API is still experimental and may be subject to change.
type Authentication struct {
// A set of authentication providers. If none are specified,