Field XAS_SESSION_ID in RequestHandler has been deprecated in Mx 5.15.0

1
Regarding this: Field XAS_SESSION_ID in RequestHandler has been deprecated. We noticed that our custom login system (which uses this field) is not working anymore. How do we have to replace this kind of code to get it working in 5.15? response.addCookie(XAS_SESSION_ID, session.getId().toString(),"/" ,"" ,-1 ); response.addCookie(XAS_ID, "0." + Core.getXASId(),"/" ,"" ,-1); response.addCookie("xasid", "0." + Core.getXASId(),"/" ,"" ,-1); response.setStatus(IMxRuntimeResponse.SEE_OTHER); response.addHeader("location", "../" + INDEX_PAGE);
asked
2 answers
3

It's only deprecated, not removed in 5.15, so your code should keep on working.

However, you are advised to fix your code now to be future proof. Your code editor should give you the following deprecation warning:

@deprecated Use {@link #getSessionCookieName()} instead.

You can call getSessionCookieName on your requesthandler instance to get the name of the cookie (which XAS_SESSION_ID refers to)

I'll see if I can contact the login system maintainers to see if they can fix it there as well.

answered
3

I use this: Core.getConfiguration().getSessionIdCookieName()

answered