Пример #1
0
 @Override
 public String getPassword() {
   return user.getPassword();
 }
Пример #2
0
 @Override
 public String getUsername() {
   return user.getEmail();
 }
Пример #3
0
 @Override
 public Collection<? extends GrantedAuthority> getAuthorities() {
   return user.getRoles().stream().map(SimpleGrantedAuthority::new).collect(Collectors.toList());
 }