Search code examples
node.jshttpsessionsession-cookies

how to call my web application from a application that does not support cookie


I am trying to understand how to call my web application (that requires login to become a authorized session) from a non web source that does not support cookies.

Ideally I like to connect to my server with my login details from my MATLAB application and then use my web servers established sessionID. With the resulting SessionID and newly created session I would then make a HTTP request to my Nodejs server. Is their extra middle ware I need to add to my Nodejs server to accept this HTTP post? Is this possible even without cookies? Trying to wrap my head around this, Thanks in advance.


Solution

  • The proper way of handling session without cookies is to send it with each REST API request, for example:

    http://domain/path/index.jsp;sessionid=abdefghijk 
    

    This logic can be handled in your Node.js app, would be hard to make more suggestions without actually seeing the code.

    The disadvantage is that someone can literally see the token in the URL while standing next to you, making it less secure than cookies. But otherwise it's the same thing.