diff options
author | Sai Gandham <sg481n@att.com> | 2019-02-15 10:06:31 -0600 |
---|---|---|
committer | Sai Gandham <sg481n@att.com> | 2019-02-15 10:16:19 -0600 |
commit | ac7cd3ac1cd79eff3a8e20e23e5a550fb68b8af2 (patch) | |
tree | cb439b28cad16b79c606000dd34303a90d1aa252 /shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java | |
parent | a649fd1b3c8308b4c7cc2018965c93bff9d7eb54 (diff) |
fix shiro logs looping issue
Issue-ID: AAF-655
Change-Id: I6719683718ec8dc2695df1eb14b6b490df5976c5
Signed-off-by: Sai Gandham <sg481n@att.com>
Diffstat (limited to 'shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java')
-rw-r--r-- | shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java b/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java index 45bdadc..beb9707 100644 --- a/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java +++ b/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFAuthenticationInfo.java @@ -36,7 +36,7 @@ import org.onap.aaf.cadi.Hash; public class AAFAuthenticationInfo implements AuthenticationInfo { private static final long serialVersionUID = -1502704556864321020L; - final static Logger logger = LoggerFactory.getLogger(AAFAuthenticationInfo.class); + final static Logger logger = LoggerFactory.getLogger(AAFAuthenticationInfo.class); // We assume that Shiro is doing Memory Only, and this salt is not needed cross process private final static int salt = new SecureRandom().nextInt(); @@ -52,11 +52,13 @@ public class AAFAuthenticationInfo implements AuthenticationInfo { } @Override public byte[] getCredentials() { +// logger.info("AAFAuthenticationInfo.getCredentials"); return hash; } @Override public PrincipalCollection getPrincipals() { +// logger.info( "AAFAuthenticationInfo.getPrincipals"); return apc; } @@ -65,6 +67,7 @@ public class AAFAuthenticationInfo implements AuthenticationInfo { UsernamePasswordToken upt = (UsernamePasswordToken)atoken; if(apc.getPrimaryPrincipal().getName().equals(upt.getPrincipal())) { byte[] newhash = getSaltedCred(new String(upt.getPassword())); + logger.info("Successful authentication attempt by " +upt.getPrincipal()); if(newhash.length==hash.length) { for(int i=0;i<hash.length;++i) { if(hash[i]!=newhash[i]) { |