private boolean openIdAuthenticationSuccesfullButUserIsNotRegistered( AuthenticationException exception) { return exception instanceof UsernameNotFoundException && exception.getAuthentication() instanceof OpenIDAuthenticationToken && OpenIDAuthenticationStatus.SUCCESS.equals( (getOpenIdAuthenticationToken(exception)).getStatus()); }
@RequestMapping("/") public String index(Model model, OpenIDAuthenticationToken authentication) { model.addAttribute( "authenticated", authentication != null ? OpenIDAuthenticationStatus.SUCCESS.equals(authentication.getStatus()) : Boolean.FALSE); return "index"; }