@Test public void testValidateCredentials() { assertFalse(new AzureProtocol().validate(new Credentials("u"), new LoginOptions(new AzureProtocol()))); assertFalse(new AzureProtocol().validate(new Credentials("u", "abc"), new LoginOptions(new AzureProtocol()))); assertTrue(new AzureProtocol().validate(new Credentials("u", Base64.encodeBase64String("abc".getBytes())), new LoginOptions(new AzureProtocol()))); }
@Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; }
AzureProtocol extends AbstractProtocol { @Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; } }
AzureProtocol extends AbstractProtocol { @Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; }  }
AzureProtocol extends AbstractProtocol { @Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; }  @Override String getName(); @Override String getUsernamePlaceholder(); @Override String getPasswordPlaceholder(); @Override boolean isHostnameConfigurable(); @Override boolean isPortConfigurable(); @Override String getIdentifier(); @Override String getDescription(); @Override Scheme getScheme(); @Override boolean validate(final Credentials credentials, final LoginOptions options); @Override DirectoryTimestamp getDirectoryTimestamp(); @Override Comparator<String> getListComparator(); }
AzureProtocol extends AbstractProtocol { @Override public boolean validate(final Credentials credentials, final LoginOptions options) { if(super.validate(credentials, options)) { if(options.password) { return Base64.validateIsBase64String(credentials.getPassword()); } return true; } return false; }  @Override String getName(); @Override String getUsernamePlaceholder(); @Override String getPasswordPlaceholder(); @Override boolean isHostnameConfigurable(); @Override boolean isPortConfigurable(); @Override String getIdentifier(); @Override String getDescription(); @Override Scheme getScheme(); @Override boolean validate(final Credentials credentials, final LoginOptions options); @Override DirectoryTimestamp getDirectoryTimestamp(); @Override Comparator<String> getListComparator();  }