Titanium JIRA Archive
Appcelerator Community (AC)

[AC-884] Node.ACS Logout Method does not allow manual calling

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2014-03-03T17:45:36.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Appcelerator Modules
Labelslogout, node.acs, users
ReporterLeandro Macrini
AssigneeSeth Toda
Created2014-02-28T10:37:16.000+0000
Updated2016-03-08T07:37:11.000+0000

Description

To permit the manual logout passing the session_id as argument the content of method: 'logout',executor: function () in acs.jd at line 659 should be:
if(typeof arguments[0] == 'function') {
   var callback = arguments[0];
   var req = arguments[1];
   var res = arguments[2];
   defaultExecutor.call(this, {}, function (evt) {
      ACS.reset();
      if(req && res) {
         res.cookie(COOKIE_NAME, '');
      }
      callback(evt);
   }, req, res);
} else {
   var data = arguments[0];
   var callback = arguments[1];
   var req = arguments[2];
   var res = arguments[3];
   defaultExecutor.call(this, data, function (evt) {
      ACS.reset();
      if(req && res) {
         res.cookie(COOKIE_NAME, '');
      }
      callback(evt);
      }, req, res);
}
I have tried with this code and the ACS server respond OK so the manual logout should be correnct on the server side. (i'm sorry for my not perfect english).

Comments

  1. Seth Toda 2014-02-28

    Hello Leandro, Can you provide a use case? The code you provided above matches the 'remove' method on line 670. Could this work for you?
  2. Leandro Macrini 2014-03-02

    yes the code is the same of the method 'remove' and yes, if I use it with 'logout', it works and logout from the ACS.
  3. Seth Toda 2014-03-03

    Great! I'm glad this helped you.
  4. Leandro Macrini 2014-03-03

    thanks to you. i hope to see this on the next release ;) bye

JSON Source