code: func (s *Handler) authHandler(w http.ResponseWriter, r *http.Request) {
  	formPassword := r.FormValue("password")
  
  	insecure := s.config.Insecure
  	password := s.config.Password
  	secret := s.config.Secret
  
  	if insecure {
  		w.Header().Set("Content-Type", "application/json")
  		resp := struct {
  			Token string `json:"token"`
  		}{
  			Token: "insecure",
  		}
  		json.NewEncoder(w).Encode(resp)
  		return
  	}
  
  	if password == "" || secret == "" {
  		log.Error().Msg("admin_password and admin_secret must be set in configuration")
  		http.Error(w, "Bad Request", http.StatusBadRequest)
  		return
  	}
  
  	if formPassword == password {
  		w.Header().Set("Content-Type", "application/json")
  		token, err := generateSecureAdminToken(secret)
  		if err != nil {
  			log.Error().Msgf("error generating admin token: %v", err)
  			http.Error(w, "Internal Server Error", http.StatusInternalServerError)
  			return
  		}
  		resp := map[string]string{
  			"token": token,
  		}
  		json.NewEncoder(w).Encode(resp)
  		return
  	}
  	http.Error(w, "Bad Request", http.StatusBadRequest)
  }
docs: // authHandler allows to get admin web interface token.