Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
65f058a088
2 changed files with 9 additions and 1 deletions
|
@ -601,7 +601,7 @@ public class AuthenticationManager {
|
||||||
credentials.add(UserCredentialModel.totp(totp));
|
credentials.add(UserCredentialModel.totp(totp));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (password == null && passwordToken == null) {
|
if ((password == null || password.isEmpty()) && (passwordToken == null || passwordToken.isEmpty())) {
|
||||||
logger.debug("Password not provided");
|
logger.debug("Password not provided");
|
||||||
return AuthenticationStatus.MISSING_PASSWORD;
|
return AuthenticationStatus.MISSING_PASSWORD;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,6 +202,14 @@ public class FederationProvidersIntegrationTest {
|
||||||
Assert.assertNotNull(oauth.getCurrentQuery().get(OAuth2Constants.CODE));
|
Assert.assertNotNull(oauth.getCurrentQuery().get(OAuth2Constants.CODE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void loginLdapWithoutPassword() {
|
||||||
|
loginPage.open();
|
||||||
|
loginPage.login("john@email.org", "");
|
||||||
|
|
||||||
|
Assert.assertEquals("Invalid username or password.", loginPage.getError());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void passwordChangeLdap() throws Exception {
|
public void passwordChangeLdap() throws Exception {
|
||||||
changePasswordPage.open();
|
changePasswordPage.open();
|
||||||
|
|
Loading…
Reference in a new issue