cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Login Module

Former Member
0 Kudos

Hello All,

I am trying to implement a simple custom login module for my J2EE App. I am following the following link http://help.sap.com/saphelp_nw2004s/helpdata/en/3f/1be040e136742ae10000000a155106/content.htm.

I did everything from coding custom Login module, deploying the MyLoginModule sda, configuring it in Security Provider service in visual administrator, configuring my web-j2ee-engine.xml and web.xml.

I also configured my J2EE App in visual administrator>Security Provider Service to use my custom login module. In web.xml, I checked the Login Configuration and selected FORM based authentication. I also put a login page and a error page.

When I go to Security Provider Service in Visual Administrator and select my app in the Components list and select the Authentication tab, I see both BasicPasswordLoginModule (flag=sufficient) and My custom Login Module (flag=required).

I still can't get it to work. What else do I need do to make sure that my app should (or is) use the custom login module?

Thanks,

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

I had the custom login module working after I created a stack for it and used it in my servlet like this..

			LoginContext lc = new LoginContext("MyLoginStack");
			lc.login();

Now, its rightly able to find my custom login module and invoke its login() method. But, it's failing at this particular line in the login() method.

			callbackHandler.handle(callbacks);

The e.getMessage() says "Access Denied". I am using the same example code thats available at http://help.sap.com/saphelp_nw2004s/helpdata/en/3f/1be040e136742ae10000000a155106/content.htm

I also defined the user name text box in my login.html as "user_name" so that it's pulled correctly in the login module class.

What am I missing?

Thanks,

Kiran