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();
}
@Override
public byte[] getCredentials() {
+// logger.info("AAFAuthenticationInfo.getCredentials");
return hash;
}
@Override
public PrincipalCollection getPrincipals() {
+// logger.info( "AAFAuthenticationInfo.getPrincipals");
return apc;
}
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]) {