3333
This commit is contained in:
parent
86975dceb0
commit
f6d609ea4f
|
|
@ -81,14 +81,14 @@ namespace Infrastructure
|
||||||
|
|
||||||
var tokenDescriptor = new TokenValidationParameters
|
var tokenDescriptor = new TokenValidationParameters
|
||||||
{
|
{
|
||||||
ValidateIssuerSigningKey = true,
|
ValidateIssuerSigningKey = true, // 验证签名密钥
|
||||||
ValidateIssuer = true,
|
ValidateIssuer = true, // 验证发行者
|
||||||
ValidateAudience = true,
|
ValidateAudience = true, // 验证接收者
|
||||||
ValidIssuer = jwtSettings.Issuer,
|
ValidIssuer = jwtSettings.Issuer, // 指定有效的发行者
|
||||||
ValidAudience = jwtSettings.Audience,
|
ValidAudience = jwtSettings.Audience, // 指定有效的接收者
|
||||||
IssuerSigningKey = new SymmetricSecurityKey(key),
|
IssuerSigningKey = new SymmetricSecurityKey(key), // 签名密钥
|
||||||
ValidateLifetime = true,//是否验证Token有效期,使用当前时间与Token的Claims中的NotBefore和Expires对比
|
ValidateLifetime = true, // 验证Token有效期
|
||||||
ClockSkew = TimeSpan.FromSeconds(30)
|
ClockSkew = TimeSpan.FromMinutes(60) // 时钟偏差容忍度
|
||||||
//RequireExpirationTime = true,//过期时间
|
//RequireExpirationTime = true,//过期时间
|
||||||
};
|
};
|
||||||
return tokenDescriptor;
|
return tokenDescriptor;
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,13 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
||||||
port.HistoryRemarks = parm.HistoryRemarks;
|
port.HistoryRemarks = parm.HistoryRemarks;
|
||||||
port.Remarks = parm.Remarks;
|
port.Remarks = parm.Remarks;
|
||||||
port.OpticalAttenuation = parm.OpticalAttenuation;
|
port.OpticalAttenuation = parm.OpticalAttenuation;
|
||||||
|
if (port.Status == 0)
|
||||||
|
{
|
||||||
|
port.HistoryRemarks = "";
|
||||||
|
port.Remarks = "";
|
||||||
|
port.OpticalAttenuation = "";
|
||||||
|
}
|
||||||
|
|
||||||
var response = _OdfPortsService.UpdateOdfPorts(port);
|
var response = _OdfPortsService.UpdateOdfPorts(port);
|
||||||
|
|
||||||
return ToResponse(response);
|
return ToResponse(response);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user