added new basic auth endpoint
This commit is contained in:
parent
804842e7c5
commit
8c9ab3b8d2
10 changed files with 249 additions and 51 deletions
|
|
@ -28,9 +28,10 @@ type Server struct {
|
|||
|
||||
srv *http.Server
|
||||
|
||||
API *client.APIClient
|
||||
DB *db.DB
|
||||
JWT *jwt.JWT
|
||||
API *client.APIClient
|
||||
DB *db.DB
|
||||
JWT *jwt.JWT
|
||||
BasicAuth *BasicAuth
|
||||
|
||||
ts *TemplateStore
|
||||
}
|
||||
|
|
@ -72,6 +73,10 @@ func (s *Server) Start(dblog logr.Logger) (err error) {
|
|||
if err != nil {
|
||||
return errors.New("server: " + err.Error())
|
||||
}
|
||||
s.BasicAuth, err = NewBasicAuth(NewDBLoginValidator(s.DB))
|
||||
if err != nil {
|
||||
return errors.New("server: " + err.Error())
|
||||
}
|
||||
go func() {
|
||||
time.Sleep(time.Second * 2)
|
||||
s.srv.ListenAndServe()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue