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