|
@@ -10,6 +10,7 @@ import (
|
|
|
"net/url"
|
|
|
"regexp"
|
|
|
"strings"
|
|
|
+ "time"
|
|
|
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/gateway/core/router"
|
|
@@ -174,10 +175,12 @@ func (s *sussBi) CheckLoginOut(r *ghttp.Request) bool {
|
|
|
func (s *sussBi) Filter(r *ghttp.Request) error {
|
|
|
ctx := router.GetGContext(r.GetCtx())
|
|
|
http.SetCookie(r.Response.ResponseWriter, &http.Cookie{
|
|
|
- Name: "BITOKEN",
|
|
|
- Value: common.GetMd5String(fmt.Sprintf("%s_%s_%d_%d_%d_%d_%d_%d_%s_%d_%s_%d", ctx.Sess.NickName, ctx.Sess.YyName, ctx.Sess.EntRole, ctx.Sess.EntNicheDis, ctx.Sess.PositionId, ctx.Sess.AccountId, ctx.Sess.EntAccountId, ctx.Sess.EntId, ctx.Sess.EntName, ctx.Sess.EntDeptId, ctx.Sess.EntUserName, ctx.Sess.EntUserId)),
|
|
|
- Path: "/",
|
|
|
- Domain: ".jydev.jianyu360.com",
|
|
|
+ Name: "BITOKEN",
|
|
|
+ Value: common.GetMd5String(fmt.Sprintf("%s_%s_%d_%d_%d_%d_%d_%d_%s_%d_%s_%d", ctx.Sess.NickName, ctx.Sess.YyName, ctx.Sess.EntRole, ctx.Sess.EntNicheDis, ctx.Sess.PositionId, ctx.Sess.AccountId, ctx.Sess.EntAccountId, ctx.Sess.EntId, ctx.Sess.EntName, ctx.Sess.EntDeptId, ctx.Sess.EntUserName, ctx.Sess.EntUserId)),
|
|
|
+ Path: "/",
|
|
|
+ HttpOnly: false,
|
|
|
+ MaxAge: 604800,
|
|
|
+ Expires: time.Now().AddDate(0, 0, 7),
|
|
|
})
|
|
|
if ctx.Sess.NewUid != 0 {
|
|
|
replaceMap := map[string]interface{}{
|