• No replies
1 Post

Pinned topic Single sign on for PE and CE

‏2013-04-24T04:42:56Z |

Hi, i am trying to find out how to connect to the PE / CE with the java API by using the same user that is logged onto Business Space.

Would the following work for connecting to either?



Subject subject = Subject.getSubject(AccessController.getContext());

        if (subject == null) {

  "Subject was null! Will use default login credentials for PE request.");

            return null;

"Found security subject in context; pushing subject into current user context");

        UserContext old = UserContext.get();

        UserContext uc = new UserContext();


        UserContext.set(uc);"Set UserContext for current request.");


//perform request using VWSession.




I want to do this for each operation to a VWSession which has already been established prior with other credentials:


session = new VWSession();

  "Connecting to Process Engine at url: [" + configuration.getUrl() + "] at connection point: [" + configuration.getConnectionPointName() + "]");
            session.logon(configuration.getUser(), configuration.getPassword(), configuration.getConnectionPointName());
  "Connection to PE established.");


Will this approach work?