SAML error creating session

2
Hi All, Working with the SAML module here and running into error creating the session of my user: Caused by: java.lang.Exception: Single Sign On unable to create new session: Unsupported value: system.proxies.Session@f69677b7 (class system.proxies.Session)   Any idea why? Using the last verion of the module (3.1.3)   Thanks for the input!  
asked
2 answers
4

It looks like the last version of the SAML module has a critical bug in its Java code. If you look at javasource\saml20\implementation\security\SessionManager.java (relative to your project directory), you will find on lines 212 through 215 the following:

params.put("PreviousSession", (currentSession == null ? null : system.proxies.Session.initialize(mxContext, currentSession)));
params.put("NewSession", system.proxies.Session.initialize(mxContext, newSession));
params.put("PreviousUser", (currentUser == null ? null : User.initialize(mxContext, currentUser)));
params.put("NewUser", User.initialize(mxContext, newUser));

Those lines try to put proxy objects in the parameters to a microflow call, while those should be raw Mendix objects. Thus, you can replace those lines by the following:

params.put("PreviousSession", currentSession);
params.put("NewSession", newSession);
params.put("PreviousUser", currentUser);
params.put("NewUser", newUser);

That should resolve the issue.

answered
1

Hi Thom,

 

This did the trick, Thank you.

 

answered