package org.argeo.security.jcr.jackrabbit;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
Authentication authentication) throws AuthenticationException {
UsernamePasswordAuthenticationToken siteAuth = (UsernamePasswordAuthenticationToken) authentication;
String username = siteAuth.getName();
+ char[] password = (char[]) siteAuth.getCredentials();
try {
SimpleCredentials sp = new SimpleCredentials(siteAuth.getName(),
- siteAuth.getCredentials().toString().toCharArray());
+ password);
User user = (User) getUserManager().getAuthorizable(username);
if (user == null)
throw new BadCredentialsException("Bad credentials");
} catch (Exception e) {
throw new BadCredentialsException(
"Cannot authenticate " + siteAuth, e);
+ } finally {
+ Arrays.fill(password, '*');
}
try {