elbuild
elbuild

Reputation: 4899

Using Wordpress wp_users table to perform Glassfish authentication

I'm struggling to find the best way to handle the following use case.

I've a Wordpress based website and I'm developing a Java EE based web application to handle a particular process that can't be handled in Wordpress.

The user base is the same, so I would like to allow the user to sign on on Wordpress and on my Glassfish deployed Java EE application with the same credentials. I'm not talking of SSO, I just need to ensure that the same username/password works in both applications.

The solutions that come into my mind are the following (each one has a drawback):

Any other idea is appreciated.

Thank you.

Upvotes: 0

Views: 154

Answers (1)

elbuild
elbuild

Reputation: 4899

After a bit of research it actually came out that computing WP Hashes in Java is really feasible, since they use the Portable PHP password hashing framework. There're several library out there that somehow helps in implementing PHPass in Java.

I've managed to modify this class a little bit to adapt it to be used in a Glassfish Authenticator created with Authentic Roast.

So the second option mentioned in my question was the one I finally implemented.

Upvotes: 0

Related Questions