code: func (s *Handler) adminSecureTokenAuth(h http.Handler) http.Handler {
  
  	secret := s.config.Secret
  	insecure := s.config.Insecure
  
  	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
  		if insecure {
  			h.ServeHTTP(w, r)
  			return
  		}
  
  		if secret == "" {
  			log.Error().Msg("no admin secret key found in configuration")
  			w.WriteHeader(http.StatusUnauthorized)
  			return
  		}
  
  		authorization := r.Header.Get("Authorization")
  
  		parts := strings.Fields(authorization)
  		if len(parts) != 2 {
  			w.WriteHeader(http.StatusUnauthorized)
  			return
  		}
  		authMethod := strings.ToLower(parts[0])
  
  		if authMethod != "token" || !checkSecureAdminToken(secret, parts[1]) {
  			w.WriteHeader(http.StatusUnauthorized)
  			return
  		}
  
  		h.ServeHTTP(w, r)
  	})
  }
docs: // adminSecureTokenAuth ...