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); }
private static Query<User> getUsernamePasswordAuthUserFind( final UsernamePasswordAuthUser identity) { return getEmailUserFind(identity.getEmail()) .filter("linkedAccounts.providerKey", identity.getProvider()); }
public void changePassword(final UsernamePasswordAuthUser authUser, final boolean create) { password = authUser.getHashedPassword(); modificationTimestamp = new Date(); save(); }
private static ExpressionList<User> getUsernamePasswordAuthUserFind( final UsernamePasswordAuthUser identity) { return getEmailUserFind(identity.getEmail()); }
public static User findByUsernamePasswordIdentity(final UsernamePasswordAuthUser identity) { return getEmailUserFind(identity.getEmail()).findUnique(); }
private static ExpressionList<User> getUsernamePasswordAuthUserFind( final UsernamePasswordAuthUser identity) { return getEmailUserFind(identity.getEmail()) .eq("linkedAccounts.providerKey", identity.getProvider()); }