/** * 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 String password, final String workstation, final String domain) { super(); if (userName == null) { throw new IllegalArgumentException("User name may not be null"); } this.principal = new NTUserPrincipal(domain, userName); this.password = password; if (workstation != null) { this.workstation = workstation.toUpperCase(Locale.ENGLISH); } else { this.workstation = null; } }
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
this.principal = new NTUserPrincipal( username.substring(0, atSlash).toUpperCase(Locale.ENGLISH), username.substring(atSlash + 1)); } else { this.principal = new NTUserPrincipal( null, username.substring(atSlash + 1));
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
/** * 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 String password, final String workstation, final String domain) { super(); if (userName == null) { throw new IllegalArgumentException("User name may not be null"); } this.principal = new NTUserPrincipal(domain, userName); this.password = password; if (workstation != null) { this.workstation = workstation.toUpperCase(Locale.ENGLISH); } else { this.workstation = null; } }
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
/** * 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 String password, final String workstation, final String domain) { super(); if (userName == null) { throw new IllegalArgumentException("User name may not be null"); } this.principal = new NTUserPrincipal(domain, userName); this.password = password; if (workstation != null) { this.workstation = workstation.toUpperCase(Locale.ENGLISH); } else { this.workstation = null; } }
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
/** * 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 String password, final String workstation, final String domain) { super(); if (userName == null) { throw new IllegalArgumentException("User name may not be null"); } this.principal = new NTUserPrincipal(domain, userName); this.password = password; if (workstation != null) { this.workstation = workstation.toUpperCase(Locale.ENGLISH); } else { this.workstation = null; } }
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
/** * 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 String password, final String workstation, final String domain) { super(); if (userName == null) { throw new IllegalArgumentException("User name may not be null"); } this.principal = new NTUserPrincipal(domain, userName); this.password = password; if (workstation != null) { this.workstation = workstation.toUpperCase(Locale.ENGLISH); } else { this.workstation = null; } }
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }
public String getUserName() { return this.principal.getUsername(); }
this.principal = new NTUserPrincipal( username.substring(0, atSlash).toUpperCase(Locale.ENGLISH), username.substring(atSlash + 1)); } else { this.principal = new NTUserPrincipal( null, username.substring(atSlash + 1));
/** * Retrieves the name to authenticate with. * * @return String the domain these credentials are intended to authenticate with. */ public String getDomain() { return this.principal.getDomain(); }