func (this *AuthController) CreateSession(uid int64, maxAge int) int { sig := utils.GenerateUUID() expired := int(time.Now().Unix()) + maxAge SaveSessionAttrs(uid, sig, expired) this.Ctx.SetCookie("sig", sig, maxAge, "/") return expired }
func (this *SsoController) Sig() { this.Ctx.Output.Body([]byte(utils.GenerateUUID())) }