docs: @Override
      public Authentication getPrincipal() {
          @SuppressWarnings("unchecked")
          Map<String, String> map = restTemplate.getForObject(userInfoUrl, Map.class);
          String userName = getUserName(map);
          String email = null;
          if (map.containsKey("email")) {
              email = map.get("email");
          }
          if (userName == null && email != null) {
              userName = email;
          }
          if (userName == null) {
              userName = map.get("id"); // no user-friendly identifier for linked
                                        // in and google
          }
          List<UaaAuthority> authorities = UaaAuthority.USER_AUTHORITIES;
          SocialClientUserDetails user = new SocialClientUserDetails(userName, authorities);
          user.setSource(Source.classify(userInfoUrl));
          user.setExternalId(getUserId(map));
          String fullName = getFullName(map);
          if (fullName != null) {
              user.setFullName(fullName);
          }
          if (email != null) {
              user.setEmail(email);
          }
          return user;
      }