Issue with XSUAA Module Implementation

0
Hey folks! I’m running into an issue with the implementation of the SAP XSUAA SSO module. To give you some background, we’ve got two applications currently deployed in cloud foundry. One uses the URL Redirect module to hop to another application, and I have implemented the XSUAA module in both. I’m able to login in with SSO on the first application with no problems, but when I hit the redirect to bring me to the separate application, I always end up getting a white blank page. The user roles have been mapped properly in CF for both applications. They’re both in Production security mode, and they both seem to have the exact same configuration, but one just doesn’t seem to be behaving.  I’m seeing similar weird functionality on a third application. Same idea here, we have the common 1st application that is using a URL Redirect to get to this third application. The XSUAA module has been implemented similarly in this third application except for the fact that roles haven’t been mapped in CF for this third application. The first time we try and get through by way of the URL redirect I get a white blank page, but if I try again it works fine. It’s every other time that I get a blank page. The last thing to note is that I have gone in and edited the java action within the XSUAA module only slightly. Some background here, we have a global (singleton) application that holds general and relevant data to keep it up-to-date. The custom code’s main purpose is that on successful authentication within the SSO module it will go and retrieve user information from that global app. For a moment I thought it was my code causing the issue, so I tried making my microflow call a synchronous call, an asynchronous call, and taking it out completely and I still get the same kind of weird functionality from both applications. Sample of edited code in XSUAA start up java action (Synchronous call):   private static void createOrUpdateUser(final String accessToken, final String username, final String fullname, final String email, final List<String> roles, final IContext context) throws CoreException { LOGGER.debug("Creating or updating an user..."); final IUser existingUser = Core.getUser(context, username); Account account; Map<String,Object> parameters = new HashMap<String, Object>(); parameters.put("UserName", username); if (existingUser == null) { LOGGER.info("User does not yet exist - creating account and logging in ..."); account = createUser(context, email, fullname, username); Core.execute(context, "SapAuthentication.SUB_RetrieveAccountFromGlobal", parameters); if (account != null) { LOGGER.info("Successfully retrieved user information"); } else { LOGGER.error("An error occurred while retrieving user information"); } } else { LOGGER.info("User exists - resetting roles and logging in ..."); account = Account.initialize(context, existingUser.getMendixObject()); Core.execute(context, "SapAuthentication.SUB_RetrieveAccountFromGlobal", parameters); } The microflow to be called upon successful authentication:
asked
0 answers