JAVA app and wordpress integration
-
Hi There,
I know little about word press and need some help please. This site is not yet live and I can not post a link to the site but I will try and explain.
We have a wordpress site developed by an external company and is hosted internally by us. We have a JAVA app where members log into and can see there own data. I need to integrate the JAVA app via iframe plugin on WordPress and this works fine. I can display my JAVA login screen in the wordpress site.
They fill in details and our JAVA checks the credentials on our database and if OK it logs the member into our JAVA app. From the JAVA app I now log into wordpress using the following code snippet from a php page we wrote …
$creds = array();
$creds[‘user_login’] = $uid2;
$creds[‘user_password’] = $ast2;
$creds[‘remember’] = false;
$user = wp_signon( $creds, false );
if ( is_wp_error($user) )
{
echo $user->get_error_message();
}
else
{
echo “AUTH-OK”;
}If we get the “AUTH-OK” reply from the php page, the login was successful we allow the login.
My problem is this … at this point I need to redirect the traffic to a wordpress page but that does not work, it is like wordpress does not know this person is logged in. If I do the login on the wordpress site then the site reponds to the current logged in session. The wordpress permalink setting used by the WordPress developers is “Post name” … does that play a role.
Can someone point me to a tutorial or a previous post showing how to log in to wordpress from a JAVA app and then redirect the page to a wordpress page and wordpres is aware of the logged in session.
Does this make sense? Thank you, Peter.
The topic ‘JAVA app and wordpress integration’ is closed to new replies.