fix:create auth token can add expire time (#2352)

* fix:create auth token can add expire time

* refactor:move expire time calculate into cache from controller
This commit is contained in:
icey-yu
2024-06-24 16:11:19 +08:00
committed by GitHub
parent 877abfe7ce
commit d6606152ee
4 changed files with 45 additions and 9 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
userRpcClient: &userRpcClient,
RegisterCenter: client,
authDatabase: controller.NewAuthDatabase(
redis2.NewTokenCacheModel(rdb),
redis2.NewTokenCacheModel(rdb, config.RpcConfig.TokenPolicy.Expire),
config.Share.Secret,
config.RpcConfig.TokenPolicy.Expire,
),