summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-05-22 17:12:38 -0500
committerInstrumental <jonathan.gathman@att.com>2018-05-22 17:12:42 -0500
commit2607c2b2cd427616a8f869c809aff19453212f14 (patch)
treea23f8ec3390c87c4dd447b4bb6e72c5e26bb0dd1
parent467b962cbf1c78bf617f2dac70096b61f4af5003 (diff)
Fix Password Add
Issue-ID: AAF-319 Change-Id: I31417b6f57b8d5646c739f14affb2f272d6cd0f2 Signed-off-by: Instrumental <jonathan.gathman@att.com>
-rw-r--r--auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_Organization.java1
-rw-r--r--auth/auth-deforg/src/test/java/org/onap/aaf/org/test/JU_DefaultOrg.java8
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/validation/ServiceValidator.java3
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);
}
}