WebApi开发框架增加Timestamp参数提升系统安全级别
作者:C/S框架网|www.cscode.ne  发布日期:2019-09-16 12:15:22
  WebApi开发框架增加Timestamp参数提升系统安全级别



贴图图片-微信截图_20190916120926


ModelRequest模型更改:


贴图图片-微信截图_20190916121232


数字签名验签(Verify Sign)更改:

C# Code:

/// <summary>
/// 验证文件请求
/// </summary>
/// <param name="request"></param>
public static void CheckSignature(IFileRequestAuth request)
{
   string secret = ApiKeyProvider.GetSecretKey(request.ApiKey);
   string sign = CryptoHelper.ToMD5(request.ApiKey + request.Bucket + secret + request.Timestamp);
   //.....省略代码
}

//来源:C/S框架网(www.csframework.com) QQ:23404761



上一篇 下一篇