I have an intranet application, for which I need to get the user credentials.
If they are connected to the network, they can access this app. I'm using the below code and calling the authenticate() method.
My .config file has
JaasSample {
com.sun.security.auth.module.NTLoginModule required debug=true;
}
server.xml has
<Realm className="org.apache.catalina.realm.JAASRealm" appName="JaasSample" debug="99" />
The code works except that it is unable to override
Tomcat, so my username is always 'SYSTEM'.
How can I override this?