// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package parser import ( "property-system-gateway/config" "git.getensh.com/common/gopkgs/jwtwrapper" ) var jwtConfig config.JwtConfig func JwtHandler(conf *config.Configure) { // jwtConfig 不为空表示已经初始化 if jwtConfig.Secret != "" { // 无变化,直接返回 if jwtConfig.Secret == conf.Jwt.Secret { return } } // 重置设置jwt secret jwtwrapper.SetSecret(conf.Jwt.Secret) jwtConfig = conf.Jwt }