Files
Yi.Framework/Yi.Framework.Net6/Yi.Framework.OcelotGateway/Builder/RefreshBuilder.cs
chenchun f5fb2ea17b 重构代码
重构代码
2022-04-02 17:44:50 +08:00

27 lines
649 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Yi.Framework.Common.Models;
namespace Yi.Framework.OcelotGateway.Builder
{
public class RefreshBuilder : AbstractBuilder
{
public override void Invoke(DataContext data)
{
//如果是刷新令牌
if ((bool)data!.IsRe!)
{
//且访问路径还是正确的
if (data.Path == data.RefreshPath)
{
data.Result = Result.Success();
}
}
else//表示不是刷新的token就要去redis里面判断了
{
base.Next(data);
}
}
}
}