From 7d081d7cc23e53caa46609186744461b8e8fd1f2 Mon Sep 17 00:00:00 2001 From: bivashy Date: Mon, 10 Jul 2023 21:12:52 +0600 Subject: [PATCH] Remove GoogleLinkEntryUser --- .../auth/link/google/GoogleLinkEntryUser.java | 16 ---------------- .../impl/link/GoogleCodeAuthenticationStep.java | 6 ++++-- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 core/src/main/java/me/mastercapexd/auth/link/google/GoogleLinkEntryUser.java diff --git a/core/src/main/java/me/mastercapexd/auth/link/google/GoogleLinkEntryUser.java b/core/src/main/java/me/mastercapexd/auth/link/google/GoogleLinkEntryUser.java deleted file mode 100644 index 739e8ce7..00000000 --- a/core/src/main/java/me/mastercapexd/auth/link/google/GoogleLinkEntryUser.java +++ /dev/null @@ -1,16 +0,0 @@ -package me.mastercapexd.auth.link.google; - -import com.bivashy.auth.api.account.Account; -import com.bivashy.auth.api.link.user.info.LinkUserInfo; - -import me.mastercapexd.auth.link.user.entry.BaseLinkEntryUser; - -public class GoogleLinkEntryUser extends BaseLinkEntryUser { - public GoogleLinkEntryUser(Account account, LinkUserInfo linkUserInfo) { - super(GoogleLinkType.getInstance(), account, linkUserInfo); - } - - public GoogleLinkEntryUser(Account account) { - this(account, account.findFirstLinkUserOrNew(GoogleLinkType.LINK_USER_FILTER, GoogleLinkType.getInstance()).getLinkUserInfo()); - } -} diff --git a/core/src/main/java/me/mastercapexd/auth/step/impl/link/GoogleCodeAuthenticationStep.java b/core/src/main/java/me/mastercapexd/auth/step/impl/link/GoogleCodeAuthenticationStep.java index e0542017..dd7aa088 100644 --- a/core/src/main/java/me/mastercapexd/auth/step/impl/link/GoogleCodeAuthenticationStep.java +++ b/core/src/main/java/me/mastercapexd/auth/step/impl/link/GoogleCodeAuthenticationStep.java @@ -13,8 +13,8 @@ import com.bivashy.auth.api.step.MessageableAuthenticationStep; import me.mastercapexd.auth.config.message.server.ServerMessageContext; -import me.mastercapexd.auth.link.google.GoogleLinkEntryUser; import me.mastercapexd.auth.link.google.GoogleLinkType; +import me.mastercapexd.auth.link.user.entry.BaseLinkEntryUser; import me.mastercapexd.auth.step.AuthenticationStepTemplate; import me.mastercapexd.auth.step.creators.AuthenticationStepFactoryTemplate; @@ -25,7 +25,9 @@ public class GoogleCodeAuthenticationStep extends AuthenticationStepTemplate imp public GoogleCodeAuthenticationStep(AuthenticationStepContext context) { super(STEP_NAME, context); - entryUser = new GoogleLinkEntryUser(context.getAccount()); + Account account = context.getAccount(); + entryUser = new BaseLinkEntryUser(GoogleLinkType.getInstance(), account, + account.findFirstLinkUserOrNew(GoogleLinkType.LINK_USER_FILTER, GoogleLinkType.getInstance()).getLinkUserInfo()); } @Override