func (m BasicAuthMiddleware) GetName() string {
	return m.Name
}
GetName returns the middleware name
package middleware
import (
	"github.com/RobyFerro/go-web-framework"
	"log"
	"net/http"
)
type BasicAuthMiddleware struct {
	Name        string
	Description string
}
func (BasicAuthMiddleware) Handle(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		store := foundation.RetrieveCookieStore()
		session, err := store.Get(r, "basic-auth")
		if err != nil {
			log.Fatal(err)
		}
		if session.Values["user"] == nil {
			http.Error(w, "Forbidden", http.StatusForbidden)
		} else {
			next.ServeHTTP(w, r)
		}
		next.ServeHTTP(w, r)
	})
}