code: public void report(PrintWriter w) {
          w.println("You are authenticated as: "+authentication.getName());
          w.println("Groups that you are in:");
          for (GrantedAuthority auth : authentication.getAuthorities()) {
              w.println("  "+auth.getAuthority());
          }
  
          w.println("Permission you need to have (but didn't): "+permission.getId());
          for (Permission p=permission.impliedBy; p!=null; p=p.impliedBy) {
              w.println(" ... which is implied by: "+p.getId());
          }
      }
docs: Reports the details of the access failure.
  This method is similar to {@link #reportAsHeaders(HttpServletResponse)} for the intention
  but instead of using HTTP headers, this version is meant to go inside the payload.