package middleware

import (
	"github.com/labstack/echo/v4"
	//"http/net"
	//"pastebin_backend/app/controller"
)

func Auth(next echo.HandlerFunc) echo.HandlerFunc {
	return func(c echo.Context) error {
		//c.Bind("User")
		/*
		cookie, _ := c.Cookie("user")
		if cookie == nil {
			err := controller.AskPasswd(c)
			if err != nil {
				return nil
			}
		}*/
		//c.Set("uid", cookie.Value)
		c.Set("uid", 114514)
		return next(c)
	}
}

/*
func CookieAuth(c echo.Context) error{
	cookie, err := c.Cookie()

	if err != nil {
		return err
	}

}*/
