• Welcome to KonaKart Community Forum. Please login or sign up.
 

Using portal login instead of KK login

Started by sashwill, August 05, 2008, 05:26:17 pm

Previous topic - Next topic

sashwill

I'm rather new to all this so please forgive my simplistic question.

I've deploy KK on my Jetspeed 2.1.3 portal running on tomcat.

What are all the steps that I would need to take to use my portal login as my KonaKart login?

Thanks for any help :)

ryan

Hi,

I'm not a Jetspeed expert so not 100% sure of the plumbing involved. Here are some ideas:


  • KonaKart has a way of delegating credential checking http://www.konakart.com/configurationfaq.php#custom_credential_checking

  • Using the KonaKart Admin API you could can create/register KonaKart users without requiring a customer to go through the process. So if you can get the details from Jetspeed, you can register the customer automatically in KonaKart.



sashwill

I've run the ant build script to make the konakart portlet, is there also a build script to run to create the admin app as a portlet?

Brian

Hi,

No we haven't got a build script like that for the Admin App...   If you end up creating one please send it to us or post it to the contributions section of the forum..  Thanks!

-Brian

sashwill

I looked at the credentials suggestion but it seems to still use the login page, useless I'm missing something?
So I still need a lot of help...
After someone has logged into my portal and they click the shopping tab which takes them to the KonaKart, I want them to be already logging into the konakart application. 
I saw this code supplied to someone else:

Class engineClass = Class.forName("com.konakart.app.KKEng");
KKEngIf eng = (KKEngIf) engineClass.newInstance();
  id = eng.login(userName, password);

Is there a place in the Konakart app that I can place this code and what do I do with the id when it's returned? If I can't modify konakart to perform this, what would I need to write.  I am trying to use as much of the default application as I can.

I'm assuming that since my portal already knows who they are, I can register them if they have not shopped with me before
What else do I need to do?

pete

All of the engine calls are done from Struts Action classes so you should look at the action classes such as LoginSubmitAction() and CustomerRegistrationSubmitAction() to figure out how to login and register a customer.

sashwill

My users aren't being logged in.
I inserted some code in the baseAction class:

LoginForm lf = new LoginForm();
        lf.setUser(request.getUserPrincipal().getName());
        lf.setPassword("genericPassword");
        kkAppEng.getCustomerMgr().login(lf.getUser(), lf.getPassword());
       


I wrote my own checkCredentials class and set it up in the configuration:

public class KonaLogin implements com.konakart.bl.LoginIntegrationMgrInterface  {

    public int checkCredentials(String arg0, String arg1) throws KKException {
        System.out.println("!!!!!!!!!!!!!!this is custom checkCredentials");
        return 1;
    }

It runs because I see the println

I am always returning a 1 because my internal users have already authenticated before they can get to the shopping cart. I thought that if I return a positive number the login should succeed?   

But as I said at the beginning it doesn't log the user in.  What am I doing wrong?

pete

Do you get any exceptions in the log ?
Have your users been registered in KonaKart ? If they don't exist in KonaKart you must register them before attempting a login.

sashwill

I get no exceptions in the log.

I check with  doesCustomerExistForEmail(username) and it returns true, but the kkAppEng.getSessionId() is null


I have added users directly into the database via an ETL from our database with the password set to "genericPassword" since i'm not really using this password. Is this the problem, if so how do i make it work by doing this since this is mode we prefer.
Do i need to populate other tables besides the "customers" table?
I thought that i told earlier the checkcredintials should handle this?

pete

You should use our API to register the customers since the registration process touches several tables.

dnavarro


Hi,

   I've deploy KonaKart on my Liferay 5.2.3 portal, and as  sashwill  I would like to use my portal login as my KonaKart login.

   To do it, I register some users in konakartadmin, and, with the same email and password in Liferay,
and I've configured the LOGIN_INTEGRATION_CLASS with  com.konakart.bl.LoginIntegrationMgr

   When a customer make a login in Liferay, a Hook (a Liferay hook) executes:

KKAppEng kkAppEng = this.getKKAppEng(request, response);   //"this." because this class extends BaseAction
String sessionId = kkAppEng.getCustomerMgr().login(user, password);

but sessionId is always null.

   Is this the correct way to make a login?. (I'm following the "LoginSubmitAction" step by step as login sample).