-
Jul 30th, 2012, 09:48 AM
#1
Trying to Authenticate in Exported POJO Method
Hi,
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(
userService.loadUserByUsername(user), pass);
auth = authenticationManager.authenticate(auth);
SecurityContextHolder.getContext().setAuthenticati on(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?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules