-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
It good that we may set basic auth on per-endpoint level
http.HandleFunc("/user/", authenticator.Wrap(handleUser))
http.HandleFunc("/book/", authenticator.Wrap(handleBook))But for most cases it would be better to have some global "interceptor" for all endpoints.
And looks like the most simple way is to make a delegating Handler and use it with SericeMux.
Here I created a basic sample:
https://gist.github.com/stokito/24b3e6efb3e1e9357c7d964a7df2c18c
Can you add such AuthHandler into the library?
Metadata
Metadata
Assignees
Labels
No labels