protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken) throws AuthenticationException {
UsernamePasswordToken token = (UsernamePasswordToken) authcToken;
User user = accountService.findUserByLoginName(token.getUsername());
if (user != null) {
if ("disabled".equals(user.getStatus())) {
throw new DisabledAccountException();
}
byte[] salt = Encodes.decodeHex(user.getSalt());
return new SimpleAuthenticationInfo(new ShiroUser(user.getLoginName(), user.getName()), user.getPassword(),
ByteSource.Util.bytes(salt), getName());