[AC-884] Node.ACS Logout Method does not allow manual calling
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2014-03-03T17:45:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Appcelerator Modules |
Labels | logout, node.acs, users |
Reporter | Leandro Macrini |
Assignee | Seth Toda |
Created | 2014-02-28T10:37:16.000+0000 |
Updated | 2016-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).
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?
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.
Great! I'm glad this helped you.
thanks to you. i hope to see this on the next release ;) bye