/** * Constructor. * @param userName The user name. This should not include the domain to authenticate with. * For example: "user" is correct whereas "DOMAIN\user" is not. * @param password The password. * @param workstation The workstation the authentication request is originating from. * Essentially, the computer name for this machine. * @param domain The domain to authenticate within. */ public NTCredentials( final String userName, final char[] password, final String workstation, final String domain) { this(userName, password, convertHost(workstation), domain, convertDomain(domain)); }