update components
This commit is contained in:
parent
38acdb335b
commit
7204e2a9d8
7 changed files with 133 additions and 27 deletions
|
@ -3444,5 +3444,57 @@
|
|||
contentType: "application/json"
|
||||
});
|
||||
};
|
||||
|
||||
self.createPin = function () {
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: self.getUrl('Auth/Pin'),
|
||||
data: {
|
||||
deviceId: self.deviceId(),
|
||||
appName: self.appName()
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getPinStatus = function (pinInfo) {
|
||||
|
||||
var queryString = {
|
||||
deviceId: pinInfo.DeviceId,
|
||||
pin: pinInfo.Pin
|
||||
};
|
||||
|
||||
return self.ajax({
|
||||
type: 'GET',
|
||||
url: self.getUrl('Auth/Pin', queryString),
|
||||
dataType: 'json'
|
||||
});
|
||||
};
|
||||
|
||||
function exchangePin(pinInfo) {
|
||||
|
||||
return self.ajax({
|
||||
type: 'POST',
|
||||
url: self.getUrl('Auth/Pin/Exchange'),
|
||||
data: {
|
||||
deviceId: pinInfo.DeviceId,
|
||||
pin: pinInfo.Pin
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
|
||||
self.exchangePin = function (pinInfo) {
|
||||
|
||||
return exchangePin(pinInfo).then(function (result) {
|
||||
|
||||
if (self.onAuthenticated) {
|
||||
self.onAuthenticated(self, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
};
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue