All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.as.test.http.Authentication Maven / Gradle / Ivy

There is a newer version: 35.0.0.Beta1
Show newest version
package org.jboss.as.test.http;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

/**
 * @author 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(USERNAME, PASSWORD.toCharArray());
            }
        };
    }

    public static void setupDefaultAuthenticator() {
        Authenticator.setDefault(getAuthenticator());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy