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