Jul 30th, 2012, 09:48 AM
Trying to Authenticate in Exported POJO Method
We are using the JSONRPC remote exporter and want to expose a "login" method where we will make calls on Spring Security to authenticate and cause a JSESSIONID to get created.
The code we are using looks like
MSUserDetailsService userService = new MSUserDetailsService();
Authentication auth = new UsernamePasswordAuthenticationToken(
auth = authenticationManager.authenticate(auth);
Quoting the developer who is most directly involved: "The above code should also ideally persist the authentication information inside the session. But, when UI makes a second call after login call, Server is throwing an exception saying “Authentication object not found”. However, the above logic works fine in prototype code. We are investigating on this and trying to root cause the issue."
Any ideas or chance could point us in the right direction?