"Alex D." <[EMAIL PROTECTED]> writes:
> i would like to protects my frontend-backend communication with
> sessions. One of the properties of sessions is that they became inactive
> after a certain timeout. So in this case i would like my backend to send
> smth. like this back to frontend:
>
> if( //Session inactive){
> $error->SetError(JsonRpcError_PermissionDenied, "Session inactive.
> Please relogin.");
> return $error;
> }
> That's not a problem to react to this exception properly but i don't
> want to do it in each rpc handler routine in each class. Is there a
> elegant alternative to handle this centrally?
Hi Alex,
I think this should probably be a new error code (not PermissionDenied) since
the error text is not intended to be "required"; simply added information. In
JSON-RPC, we can't assume that the user will ever see the error message field,
so the error codes themselves need to be adequately distinct. (I'm open to
the argument that the session having timed out is really the same as not ever
having been logged in, and therefore the PermissionDenied error code is the
correct one to be using. Argue for it, if you feel that way.)
I agree that this would be a useful addition, but I don't have time to work on
it in the next week or so. If you'd like to provide a patch that implements
it, I'd certainly consider applying it!
Cheers,
Derrell
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel