I am working on a WordPress plugin and I have a problem where I get the WordPress logged-in users id & session and i need to create a comment on this user's behalf from my server.
[Update] What I mean by "my server" is from my own Java server. My comment system creates the comments on the Java server and the Java server needs also to create the same comment on the wordpress PHP server. In order to create the comment on the user account i am sending the session to the Java server so it will as the wordpress to convert the session to the user, so it will be secure. [/update]
The problem is that in order to make this operation secure i need to check with WordPress that the session i got is valid and matches the user id.
I couldn't find any API that convert the session into the user id in order to check that it matches.
anyway to do that with WordPress API?