|
@@ -87,10 +87,9 @@ func ApplicationAuthOnDeviceIdentifer(context martini.Context, params martini.Pa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func ApplicationAuth(context martini.Context, params martini.Params, req *http.Request, r render.Render) {
|
|
func ApplicationAuth(context martini.Context, params martini.Params, req *http.Request, r render.Render) {
|
|
|
- identifier := params["identifier"]
|
|
|
|
|
key := req.Header.Get("App-Key")
|
|
key := req.Header.Get("App-Key")
|
|
|
|
|
|
|
|
- if identifier == "" || key == "" {
|
|
|
|
|
|
|
+ if key == "" {
|
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, errors.New("missing device identifier or app key.")))
|
|
r.JSON(http.StatusOK, renderError(ErrDeviceNotFound, errors.New("missing device identifier or app key.")))
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -102,11 +101,11 @@ func ApplicationAuth(context martini.Context, params martini.Params, req *http.R
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- err = checkAppDomain(app.AppDomain, identifier)
|
|
|
|
|
- if err != nil {
|
|
|
|
|
- r.JSON(http.StatusOK, renderError(ErrAccessDenied, err))
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //err = checkAppDomain(app.AppDomain, identifier)
|
|
|
|
|
+ //if err != nil {
|
|
|
|
|
+ // r.JSON(http.StatusOK, renderError(ErrAccessDenied, err))
|
|
|
|
|
+ // return
|
|
|
|
|
+ //}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|