Hello,
I comment on the problem. I am sending a json through POST to another environment, from dev to pre, from pre to pro … etc. The question is that with this line:
threadSafeSession = requestContext.getSession().impersonate(new SimpleCredentials(requestContext.getSession().getUserID(), new char[0]));
it gives me the following error:
javax.jcr.LoginException: LoginModule could not perform authentication: null
this in dev I have solved it as follows:
threadSafeSession = requestContext.getSession().impersonate(new SimpleCredentials(“admin”, “admin”));
but in PRE and PRO we do not have an admin user , how can I get the session with write privileges in the repository to be able to save information in the repository?