dist/evrythng.js
function _authEvrythng(credentials) {
    var $this = this;

    return EVT.api({
      url: '/auth/evrythng',
      method: 'post',
      data: credentials,
      authorization: this.apiKey
    }).then(function (access) {

      // Once it is authenticated, get this user information as well.
      return EVT.api({
        url: '/users/' + access.evrythngUser,
        authorization: access.evrythngApiKey
      }).then(function (userInfo) {

        // Keep nested success handler because we also need the *access*
        // object returned form the previous call to create the User Scope.
        var userObj = Utils.extend(userInfo, {
          id: access.evrythngUser,
          apiKey: access.evrythngApiKey
        });

        // Create User Scope
        var user = new EVT.User(userObj, $this);

        return { user: user };

      });

    });
  }
function _authEvrythng(credentials) {
    var $this = this;

    return EVT.api({
      url: '/auth/evrythng',
      method: 'post',
      data: credentials,
      authorization: this.apiKey
    }).then(function (access) {

      // Once it is authenticated, get this user information as well.
      return EVT.api({
        url: '/users/' + access.evrythngUser,
        authorization: access.evrythngApiKey
      }).then(function (userInfo) {

        // Keep nested success handler because we also need the *access*
        // object returned form the previous call to create the User Scope.
        var userObj = Utils.extend(userInfo, {
          id: access.evrythngUser,
          apiKey: access.evrythngApiKey
        });

        // Create User Scope
        var user = new EVT.User(userObj, $this);

        return { user: user };

      });

    });
  }
function _authEvrythng ( credentials ) { var $this = this ; return EVT . api ( { url : '/auth/evrythng' , method : 'post' , data : credentials , authorization : this . apiKey } ) . then ( function ( access ) { // Once it is authenticated, get this user information as well. return EVT . api ( { url : '/users/' + access . evrythngUser , authorization : access . evrythngApiKey } ) . then ( function ( userInfo ) { // Keep nested success handler because we also need the *access* // object returned form the previous call to create the User Scope. var userObj = Utils . extend ( userInfo , { id : access . evrythngUser , apiKey : access . evrythngApiKey } ) ; // Create User Scope var user = new EVT . User ( userObj , $this ) ; return { user : user } ; } ) ; } ) ; }
Send authentication request using Evrythng credentials.
Send authentication request using Evrythng credentials .