Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.as.test.http;
 

Author(s):
Stuart Douglas
 
 public class Authentication {
    public static final String USERNAME = "testSuite";
    public static final String PASSWORD = "testSuitePassword";
    public static Authenticator getAuthenticator() {
        return new Authenticator() {
            @Override
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(.toCharArray());
            }
        };
    }
    public static void setupDefaultAuthenticator() {
        Authenticator.setDefault(getAuthenticator());
    }
New to GrepCode? Check out our FAQ X