diff options
Diffstat (limited to 'auth')
3 files changed, 9 insertions, 3 deletions
diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_Organization.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_Organization.java index 7599241e..b898e885 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_Organization.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_Organization.java @@ -85,5 +85,4 @@ public class JU_Organization { Assert.assertTrue(Organization.NULL.getPasswordRules() instanceof String[]); } - } diff --git a/auth/auth-deforg/src/test/java/org/onap/aaf/org/test/JU_DefaultOrg.java b/auth/auth-deforg/src/test/java/org/onap/aaf/org/test/JU_DefaultOrg.java index 9120ceb2..e1bfda5b 100644 --- a/auth/auth-deforg/src/test/java/org/onap/aaf/org/test/JU_DefaultOrg.java +++ b/auth/auth-deforg/src/test/java/org/onap/aaf/org/test/JU_DefaultOrg.java @@ -145,7 +145,13 @@ public class JU_DefaultOrg { assertEquals(response.name(), "OK"); } - + + @Test + public void testDefOrgPasswords() { + assertEquals(defaultOrg.isValidPassword(authzTransMock, null, "new2You!", "Pilgrim"),""); + assertNotSame(defaultOrg.isValidPassword(authzTransMock, null, "new2you!", "Pilgrim"),""); + + } @Test public void testDefOrgNotifyPasswordExpiration_returnResponseOK() { diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/validation/ServiceValidator.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/validation/ServiceValidator.java index a6bbbb0b..61b5338b 100644 --- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/validation/ServiceValidator.java +++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/validation/ServiceValidator.java @@ -154,7 +154,8 @@ public class ServiceValidator extends Validator { } if(org.supportsRealm(cd.id)) { - if(isNew && (str=org.isValidID(trans, str)).length()>0) { + String resp = org.isValidID(trans, str); + if(isNew && (resp!=null && resp.length()>0)) { msg(cd.id,str); } } |