some ground work to support authentcation on the control channel

This commit is contained in:
2025-01-28 12:43:03 +09:00
parent d3afe29d5a
commit a97be385ec
5 changed files with 66 additions and 21 deletions

View File

@ -62,6 +62,17 @@ func (ctl *server_ctl) Id() string {
return ctl.id
}
func (ctl *server_ctl) Authenticate(req *http.Request) bool {
var s *Server
s = ctl.s
if s.cfg.CtlBasicAuth != nil && s.cfg.CtlBasicAuth.Enabled {
// perform basic authentication
}
return true
}
// ------------------------------------
func (ctl *server_ctl_server_conns) ServeHTTP(w http.ResponseWriter, req *http.Request) (int, error) {