Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8116537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:52:08+00:00 2026-06-06T03:52:08+00:00

I have another web app, that uses the liferay user database. But before a

  • 0

I have another web app, that uses the liferay user database. But before a user can access this website he needs be authenticated first. How can I achieve this functionality, I’ve tried searching the WS api for authentication using email/password, but found none.

Also the user should still be able to login to the liferay portal. And the login should be like another liferay web service.

Any hints?

Hmm, since I have access to the database maybe 1 way is to hash the password given by the client? and validate against the values stored in the database.

Found out that PwdEncryptor class is the one responsible for encrypting the password, unfortunately it has too many dependencies with liferay that I’m unable to pull it out 😕

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:52:09+00:00Added an answer on June 6, 2026 at 3:52 am

    It might not be the best approach but this solution might be what you’re looking for. It will just require the company id, email and password of the user. In my case I have the default company id from liferay.

    To authenticate an email/password, you can call other liferay webservice in my case: get-user-id-by-email-address. And then authenticate the user via HTTP Basic. When using jersey rest webservice to call the liferay web service you can code that like this:

    String url += String.format("user/get-user-id-by-email-address?companyId=%s&emailAddress=%s",
                    properties.getProperty("default.company.id"), email);
    
    ClientConfig config = new DefaultClientConfig();
    Client client = Client.create(config);
    client.addFilter(new HTTPBasicAuthFilter(email, password));
    WebResource service = client.resource(url);
    ClientResponse response = service.accept("application/json").post(ClientResponse.class);
    
    if (response.getClientResponseStatus() == com.sun.jersey.api.client.ClientResponse.Status.OK) {
     //valid user
    } else {
      //invalid user
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a web app that uses a MySQL database, but I have to
I have a web application that you can use to import information from another
Using Visual Studio 2008 and VB.Net: I have a working web app that uses
I have a web app that currently uses the current HttpContext to store a
So I have this web app that in theory may one day become a
I am trying to install my Yesod web app on another machine. I have
I have a web page that links to another web application, which unfortunately only
Hi I have a web page that opens up from another page after the
I am developing a web app that connects to a SQL 2000 database. Everything
I have a small app that a client uses to manually update some data.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.