Exemplo n.º 1
0
 public void changePassword(final UsernamePasswordAuthUser authUser, final boolean create) {
   LinkedAccount a = this.getAccountByProvider(authUser.getProvider());
   if (a == null) {
     if (create) {
       a = LinkedAccount.create(authUser);
       a.user = this;
     } else {
       throw new RuntimeException("Account not enabled for password usage");
     }
   }
   a.providerUserId = authUser.getHashedPassword();
   a.save();
 }