/*
 * @description: session判断中间件
 * @Author: CP
 * @Date: 2020-08-28 14:17:23
 * @FilePath: \construction_management\web\middleware\sessions_auth.go
 */
package middleware

import (
	"fmt"

	"github.com/iris-contrib/middleware/csrf"
	"github.com/kataras/iris/v12"
)

func SessionsAuth(ctx iris.Context) {
	//TODO 会话权限-判断
	fmt.Println("seesionsAuth")
	//通过后执行下一步

	ctx.ViewData(csrf.TemplateTag, csrf.TemplateField(ctx))
	ctx.Next()
}
