Hi, as the title describes, I am trying to implement a java web-service client which requires authentication. However, the problem I am facing is as follows:
When I enter the correct Username and password, its a perfect execution.
However, when the password is incorrect, the PasswordAuthentication itself makes multiple login attempts and finally results in the user account lock.
Here is the code snippet I am using:
try {
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
String Uv = TempU;
String Pv = TempP;
//String Uv = "tyates";
//String Pv = "dxs25dxs";
return new PasswordAuthentication(Uv, Pv.toCharArray());
}
});
I would greatly appreciate an idea or any input on limiting the number of failed login attempts to avoid the user account lock.
Thanks,
Pranay.


LinkBack URL
About LinkBacks
Reply With Quote