add productKey
parent
1b193268ce
commit
f34ad369d5
|
@ -109,7 +109,7 @@ function auth(head, type, payload) {
|
|||
var dn = arr[1];
|
||||
var model = arr[2];
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + payload.clientid);
|
||||
var pwd = md5(product.getProductSecret() + payload.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != payload.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
@ -160,7 +160,7 @@ function register(head, type, payload) {
|
|||
var dn = arr[1];
|
||||
var model = arr[2];
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + auth.clientid);
|
||||
var pwd = md5(product.getProductSecret() + auth.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != auth.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
|
|
@ -123,7 +123,7 @@ function register(payload) {
|
|||
var dn = arr[1];
|
||||
var model = arr[2];
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + auth.clientid);
|
||||
var pwd = md5(product.getProductSecret() + auth.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != auth.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
|
|
@ -110,7 +110,7 @@ function auth(head, type, payload) {
|
|||
var model = arr[2];
|
||||
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + payload.clientid);
|
||||
var pwd = md5(product.getProductSecret() + payload.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != payload.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
@ -161,7 +161,7 @@ function register(head, type, payload) {
|
|||
var model = arr[2];
|
||||
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + auth.clientid);
|
||||
var pwd = md5(product.getProductSecret() + auth.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != auth.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
|
|
@ -127,7 +127,7 @@ function register(payload) {
|
|||
var device = getPkDn(auth.clientid);
|
||||
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + auth.clientid);
|
||||
var pwd = md5(product.getProductSecret() + auth.clientid);
|
||||
|
||||
/*if (pwd.toLocaleLowerCase() != auth.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
|
|
|
@ -124,10 +124,10 @@ function register(payload) {
|
|||
var model = arr[2];
|
||||
|
||||
var product = deviceBehaviour.getProductKey(pk)
|
||||
var pwd = md5(product.productSecret + auth.clientid);
|
||||
var pwd = md5(product.getProductSecret() + auth.clientid);
|
||||
|
||||
if (pwd.toLocaleLowerCase() != auth.password.toLocaleLowerCase()) {
|
||||
throw new Error("incorrect password");
|
||||
throw new Error("incorrect password" + "pwd->" + pwd + " productSecret->" + product.productSecret);
|
||||
}
|
||||
return {
|
||||
type: "register",
|
||||
|
|
Loading…
Reference in New Issue