示例#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);
     } else {
       throw new RuntimeException("Account not enabled for password usage");
     }
   }
   a.providerUserId = authUser.getHashedPassword();
   this.linkedAccounts.add(a);
   MorphiaObject.datastore.save(this);
 }
示例#2
0
 private static Query<User> getUsernamePasswordAuthUserFind(
     final UsernamePasswordAuthUser identity) {
   return getEmailUserFind(identity.getEmail())
       .filter("linkedAccounts.providerKey", identity.getProvider());
 }
示例#3
0
 public void changePassword(final UsernamePasswordAuthUser authUser, final boolean create) {
   password = authUser.getHashedPassword();
   modificationTimestamp = new Date();
   save();
 }
示例#4
0
 private static ExpressionList<User> getUsernamePasswordAuthUserFind(
     final UsernamePasswordAuthUser identity) {
   return getEmailUserFind(identity.getEmail());
 }
示例#5
0
 public static User findByUsernamePasswordIdentity(final UsernamePasswordAuthUser identity) {
   return getEmailUserFind(identity.getEmail()).findUnique();
 }
示例#6
0
 private static ExpressionList<User> getUsernamePasswordAuthUserFind(
     final UsernamePasswordAuthUser identity) {
   return getEmailUserFind(identity.getEmail())
       .eq("linkedAccounts.providerKey", identity.getProvider());
 }