Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Java Web Service Client Authentication (limiting the number of failed attempts)

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java Web Service Client Authentication (limiting the number of failed attempts)

    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.


  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Web Service Client Authentication (limiting the number of failed attempts)

    Giving you a better view of the module:

    try {
    Authenticator.setDefault(new Authenticator() {

    @Override
    protected PasswordAuthentication getPasswordAuthentication() {
    String Uv = "user";
    String Pv = "password";
    return new PasswordAuthentication(Uv, Pv.toCharArray());
    }
    });

Similar Threads

  1. web service client
    By maverick257 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 24th, 2010, 02:59 AM
  2. Replies: 0
    Last Post: October 31st, 2010, 08:04 AM
  3. Web Service - Client - WORK OVER INTERNET
    By nikos in forum Java Networking
    Replies: 7
    Last Post: October 19th, 2010, 10:44 AM
  4. Java web client - > .NET web service
    By codeJ in forum Web Frameworks
    Replies: 0
    Last Post: July 8th, 2010, 04:34 AM
  5. Replies: 2
    Last Post: November 19th, 2009, 10:55 PM