Using %session with /api/mgmnt/ Service generated classes
Sessions and specifically %session are paramount to our application to login users to the application (the Web Gateway user logs into the server and then users login to the application).
When using /api/mgmnt/v2 to implement a spec first approach to REST API development, I am unclear how I can utilize sessions (i.e. %session) to work with our existing model (and I'm sure there are indeed better ways to do this, but we are just baby stepping right now). Much of the documentation say to make sure UseSession=1 in the dispatch class is set, which I've accomplished. This seemed hopeful because when using /api/mgmt, the generated disp.cls extends %CSP.Rest which then provides the %session var. However, the documentation is clear to not edit that class and only touch the impl.cls. This class extends %REST so it doesn't seem to know or care about %CSP.Rest or %session (however, the disp.cls does call it). Is there a way to bring this %session var into play since disp.cls calls impl.cls (without modifying disp.cls)?
I have read an article here that mentioned sessions in this context are only good for authentication (not data) however, I think that article meant authenticating into the IRIS server. I am trying to authenticate into our application and keep our user alive (and, well, keep some session data alive too).
I realize it's not quite the paradigm for REST but I'm trying to move the needle without rewriting the whole thing or completely changing how we do things today.