cancel
Showing results for 
Search instead for 
Did you mean: 

Thowing Messing from custom LoginModule

kai_unewisse3
Active Contributor
0 Kudos

Hi,

i created a custom Loginmodule for a NW Portal 7.0 which is working fine.

I want to show now a message other the "USER_AUTH_FAILED" (from

com.sap.security.core.logon.imp.SecurityPolicy ) .

which is coming from the javax.security.auth.login.LoginException .

I thow the Login Exception like :

thow new LoginException ("USERID_NOT_FOUND");

This is shown in the log that the Exception and the text is thrown.

However when i call in my custom Login iView :

UMFactory.getLogonAuthenticator().logon(request, response, "default");

I get the Exception message : USER_AUTH_FAILED and not my custom Exception.

I assume that i have to call a different (propably custom) AUTHSCHEME which has only my custom Loginmodule (using Controlflag Requisite) ?

Is there anybody who has done this ?

Regards,

Kai

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Kai,

Following http://help.sap.com/saphelp_nw04/helpdata/en/e0/397b6073674da2b835ea6d10d8934b/frameset.htm there are only a few constants supported, but you have chosen a valid one. So on the one hand: This should work.

On the other hand, the example given in help.sap.com tries the same as you did: Not returning false but throwing an exception. That should be meaningful probably only for "requisite" modules. Decompile the BasicPasswordLoginModule to get an idea how to handle the different cases (for strictLogin, which you will find, also see http://help.sap.com/saphelp_nw70/helpdata/de/d7/e08b17065b554ca57183a4c3a99340/content.htm).

From the standard login module I have seen, the documentation seems to be a bit superficial.

As I don't know your scenario in detail, I cannot say if you need a different authscheme (probably not) or if you should point the (existing) authscheme properties to the new login module stack. Also the question if there should be only your new module in the stack or other too (normally needed for ticket handling) I cannot answer without further information.

Hope it helps

Detlev

Answers (0)