on 01-07-2008 4:09 PM
Hi there,
I've developed a login module to verify if a users IP address is valid between a given IP range.
My coding is based upon the following tutorial : <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d0/5954e9f2aa47e6b91fc3ebf18d5de5/frameset.htm">Advanced Authentication Example</a>
Debugging mode is switched on, and I have seen that in following code, the first line is executed, but the code just stops when the logInfo method has completed. The line with WebCallback is not even called.
Import statments :
<i>
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginException;
import javax.servlet.http.HttpServletRequest;
import net.sourceforge.jradiusclient.RadiusAttribute;
import net.sourceforge.jradiusclient.RadiusAttributeValues;
import net.sourceforge.jradiusclient.RadiusClient;
import net.sourceforge.jradiusclient.RadiusPacket;
import com.sap.engine.interfaces.security.auth.AbstractLoginModule;
import com.sap.engine.lib.security.LoginExceptionDetails;
import com.sap.engine.lib.security.Principal;
import com.sap.engine.lib.security.http.HttpCallback;
import com.sap.engine.lib.security.http.HttpGetterCallback;
import com.sap.security.api.logon.WebCallback;
import com.sap.tc.logging.Location;
</i>
...
<i>
private String getClientIP ()
throws UnsupportedCallbackException, IOException
{
logInfo("method getClientIP");
WebCallback wcb = new WebCallback ();
_callbackHandler.handle (new Callback [] { wcb });
HttpServletRequest req = wcb.getRequest();
logInfo("Client IP : " + req.getRemoteAddr());
return req.getRemoteAddr ();
}
</i>
I use NWDI, and as used DC's I have :
<i>
com.sap.engine.client.lib
com.sap.security.api.sda
security_api
servlet
tc/logging
</i>
Any ideas?
Many thanks!
Hi,
Have You added reference com.sap.security.api.sda in your library project.
Open provider.xml file and check if you have reference com.sap.security.api.sda
Hope this helps
Jakub Krecicki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Add DC com.sap.engine.client.lib located in SAP-JEE as a used DC.
Regards,
Pablo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.