/*
 * @description: 登录权限中间件
 * @Author: CP
 * @Date: 2020-08-28 11:42:39
 * @FilePath: \construction_management\web\middleware\basicauth.go
 */
package middleware

import (
	"fmt"

	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/middleware/basicauth"
)

// BasicAuth middleware sample.
var BasicAuth = basicauth.New(basicauth.Config{
	Users: map[string]string{
		"admin": "password",
	},
})

func Before(ctx iris.Context) {
	fmt.Println("before")
	// [...]
}
