Add ability to set authenticated user in request header (#889)
* Add ability to set authenticated user in request header Some web applications provide the ability to authorize users based on the authenticated from Basic Auth. This patch provides a way to set a key to which the authenticated user can be set in the Header. For example, if I set `HeaderValue = "X-WebAuth-User"` and authenticate, my application will be able to read my user name from that header and provide me with the proper access. This fixes #802
This commit is contained in:
parent
913a297e8d
commit
94bb7a1435
4 changed files with 59 additions and 3 deletions
|
@ -222,8 +222,9 @@ type Cluster struct {
|
|||
|
||||
// Auth holds authentication configuration (BASIC, DIGEST, users)
|
||||
type Auth struct {
|
||||
Basic *Basic
|
||||
Digest *Digest
|
||||
Basic *Basic
|
||||
Digest *Digest
|
||||
HeaderField string
|
||||
}
|
||||
|
||||
// Users authentication users
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue