@Override
    public Authentication authenticate(Authentication authentication)
        throws AuthenticationException {

      try {
        Object auth = getProxyFactory().createProxy(authentication);
        Method authenticate =
            ProxyUtils.findMethodByName(target.getClass(), "authenticate", auth.getClass());
        Object retVal = authenticate.invoke(target, auth);

        if (retVal != null) {
          return getProxyFactory().createProxy(retVal);
        }

      } catch (InvocationTargetException | IllegalAccessException | ProxyException e) {
        logger.error(e.getMessage(), e);
      }

      return null;
    }