X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fclient%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Fclient%2FAbsAuthentication.java;h=da85702da99b574cfe9bad1780cbde8a5d26f993;hb=7e966914050e66219689001ff4ab601a49eef0ac;hp=cce7b5f3e6941c2e29f8c8d705d4de4a2b918fa0;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java b/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java index cce7b5f3..da85702d 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java @@ -76,7 +76,7 @@ public abstract class AbsAuthentication implements SecuritySetter implements SecuritySetter0 && lastMiss>System.currentTimeMillis()) { + if (lastMiss>0 && lastMiss>System.currentTimeMillis()) { return true; } else { lastMiss=0L; @@ -102,17 +102,17 @@ public abstract class AbsAuthentication implements SecuritySetterMAX_TEMP_COUNT) { + if (lastMiss==0L && count>MAX_TEMP_COUNT) { lastMiss=System.currentTimeMillis()+WAIT_TIME; } - // if(count>MAX_SPAM_COUNT) { + // if (count>MAX_SPAM_COUNT) { // System.err.printf("Your service has %d consecutive bad service logins to AAF. \nIt will now exit\n", // count); // System.exit(401); // } - if(count%1000==0) { + if (count%1000==0) { System.err.printf("Your service has %d consecutive bad service logins to AAF. AAF Access will be disabled after %d\n", count,MAX_SPAM_COUNT); }