Advertisement
Guest User

Untitled

a guest
Apr 13th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. ApiClient.prototype._authenticate = function () {
  2. this.authlock = true;
  3. this._rpcRequest('user.login', {
  4. user: this.user,
  5. password: this.password
  6. }, function (err, res) {
  7. if (!err) {
  8. this.authid = res;
  9. }
  10.  
  11. if (!this.version) {
  12. this._getApiVersion(function (err, res) {
  13. if (!err) {
  14. this.version = res;
  15. }
  16. this.authlock = false;
  17. this._processPendingQueries(err);
  18. }.bind(this));
  19. }
  20. else {
  21. this.authlock = false;
  22. this._processPendingQueries(err);
  23. }
  24. }.bind(this));
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement