lib/oauth2.js
function(token, callback) {
    return this._transport.httpRequest({
      method : 'POST',
      url : this.revokeServiceUrl,
      body: querystring.stringify({ token: token }),
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    }).then(function(response) {
      if (response.statusCode >= 400) {
        var res = querystring.parse(response.body);
        if (!res || !res.error) {
          res = { error: "ERROR_HTTP_"+response.statusCode, error_description: response.body };
        }
        var err = new Error(res.error_description);
        err.name = res.error;
        throw err;
      }
    }).thenCall(callback);
  }
function(token, callback) {
    return this._transport.httpRequest({
      method : 'POST',
      url : this.revokeServiceUrl,
      body: querystring.stringify({ token: token }),
      headers: {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    }).then(function(response) {
      if (response.statusCode >= 400) {
        var res = querystring.parse(response.body);
        if (!res || !res.error) {
          res = { error: "ERROR_HTTP_"+response.statusCode, error_description: response.body };
        }
        var err = new Error(res.error_description);
        err.name = res.error;
        throw err;
      }
    }).thenCall(callback);
  }
function ( token , callback ) { return this . _transport . httpRequest ( { method : 'POST' , url : this . revokeServiceUrl , body : querystring . stringify ( { token : token } ) , headers : { "Content-Type" : "application/x-www-form-urlencoded" } } ) . then ( function ( response ) { if ( response . statusCode >= 400 ) { var res = querystring . parse ( response . body ) ; if ( ! res || ! res . error ) { res = { error : "ERROR_HTTP_" + response . statusCode , error_description : response . body } ; } var err = new Error ( res . error_description ) ; err . name = res . error ; throw err ; } } ) . thenCall ( callback ) ; }
OAuth2 Revoke Session or API Token

@param {String} token - Access or Refresh token to revoke. Passing in the Access token revokes the session. Passing in the Refresh token revokes API Access.
@param {Callback.<undefined>} [callback] - Callback function
@returns {Promise.<undefined>}
OAuth2 Revoke Session or API Token