|
@@ -25,8 +25,8 @@ func (this *BaseAuthController) Prepare() {
|
|
|
//校验签名
|
|
|
nonce := this.Ctx.Input.Header("nonce")
|
|
|
timestamp := this.Ctx.Input.Header("timestamp")
|
|
|
- /*appid := this.Ctx.Input.Header("appid")
|
|
|
- signature := this.Ctx.Input.Header("signature")*/
|
|
|
+ appid := this.Ctx.Input.Header("appid")
|
|
|
+ signature := this.Ctx.Input.Header("signature")
|
|
|
|
|
|
if nonce == "" {
|
|
|
errMsg := "随机字符串不能为空"
|
|
@@ -42,7 +42,7 @@ func (this *BaseAuthController) Prepare() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- /*if appid != utils.AppId {
|
|
|
+ if appid != utils.AppId {
|
|
|
errMsg := "商家AppId错误,请核查"
|
|
|
this.JSON(models.BaseResponse{Ret: 400, Msg: "", ErrMsg: errMsg}, false, false)
|
|
|
this.StopRun()
|
|
@@ -56,7 +56,7 @@ func (this *BaseAuthController) Prepare() {
|
|
|
this.JSON(models.BaseResponse{Ret: 401, Msg: "", ErrMsg: errMsg}, false, false)
|
|
|
this.StopRun()
|
|
|
return
|
|
|
- }*/
|
|
|
+ }
|
|
|
if method != "GET" && method != "POST" {
|
|
|
errMsg := "无效的请求方式"
|
|
|
this.JSON(models.BaseResponse{Ret: 501, Msg: "", ErrMsg: errMsg}, false, false)
|