index.js
function logoff() {
    var token = cache.get('token');
    var dfrd = Q.defer();
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      request(format(URLs.logoff, PROTOCOL, conf.host, token),
        function(err) {
          if (err) {
            dfrd.reject(err);
          } else {
            dfrd.resolve(true);
          }
        });
    }
    return dfrd.promise;
  }
function logoff() {
    var token = cache.get('token');
    var dfrd = Q.defer();
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      request(format(URLs.logoff, PROTOCOL, conf.host, token),
        function(err) {
          if (err) {
            dfrd.reject(err);
          } else {
            dfrd.resolve(true);
          }
        });
    }
    return dfrd.promise;
  }
function logoff ( ) { var token = cache . get ( 'token' ) ; var dfrd = Q . defer ( ) ; if ( ! token ) { dfrd . reject ( MODULE_ERRORS . undefinedToken ) ; } else { request ( format ( URLs . logoff , PROTOCOL , conf . host , token ) , function ( err ) { if ( err ) { dfrd . reject ( err ) ; } else { dfrd . resolve ( true ) ; } } ) ; } return dfrd . promise ; }
Assuming you are logged in and have a cached token, this will log you out.
@method logoff
@returns {Function|promise|Q.promise} Promise
Assuming you are logged in and have a cached token this will log you out .