From dd1ec12fb09bd1ebe3a99af9779d7dfe9b398732 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Fri, 28 Feb 2020 17:36:09 -0500 Subject: [PATCH] Add DbFilterAuthenticatorService --- .../resources/account/AccountsResource.java | 4 +- .../resources/account/AuthResource.java | 4 +- .../bubble/resources/account/MeResource.java | 4 +- .../resources/bill/AccountPlansResource.java | 4 +- .../cloud/NetworkActionsResource.java | 4 +- .../service/account/AuthenticatorService.java | 96 +---------------- .../account/StandardAuthenticatorService.java | 101 ++++++++++++++++++ .../DbFilterAuthenticatorService.java | 18 ++++ 8 files changed, 131 insertions(+), 104 deletions(-) create mode 100644 bubble-server/src/main/java/bubble/service/account/StandardAuthenticatorService.java create mode 100644 bubble-server/src/main/java/bubble/service_dbfilter/DbFilterAuthenticatorService.java diff --git a/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java b/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java index a4f66a4a..682292f5 100644 --- a/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java +++ b/bubble-server/src/main/java/bubble/resources/account/AccountsResource.java @@ -25,7 +25,7 @@ import bubble.resources.driver.DriversResource; import bubble.resources.notify.ReceivedNotificationsResource; import bubble.resources.notify.SentNotificationsResource; import bubble.server.BubbleConfiguration; -import bubble.service.account.AuthenticatorService; +import bubble.service.account.StandardAuthenticatorService; import bubble.service.account.MitmControlService; import bubble.service.account.download.AccountDownloadService; import bubble.service.boot.SelfNodeService; @@ -66,7 +66,7 @@ public class AccountsResource { @Autowired private AccountPolicyDAO policyDAO; @Autowired private AccountMessageDAO messageDAO; @Autowired private AccountDownloadService downloadService; - @Autowired private AuthenticatorService authenticatorService; + @Autowired private StandardAuthenticatorService authenticatorService; @Autowired private SelfNodeService selfNodeService; @Autowired private SessionDAO sessionDAO; diff --git a/bubble-server/src/main/java/bubble/resources/account/AuthResource.java b/bubble-server/src/main/java/bubble/resources/account/AuthResource.java index 39486d79..190bb6f8 100644 --- a/bubble-server/src/main/java/bubble/resources/account/AuthResource.java +++ b/bubble-server/src/main/java/bubble/resources/account/AuthResource.java @@ -19,7 +19,7 @@ import bubble.model.cloud.BubbleNode; import bubble.model.cloud.NetworkKeys; import bubble.model.cloud.notify.NotificationReceipt; import bubble.server.BubbleConfiguration; -import bubble.service.account.AuthenticatorService; +import bubble.service.account.StandardAuthenticatorService; import bubble.service.account.StandardAccountMessageService; import bubble.service.backup.RestoreService; import bubble.service.bill.PromotionService; @@ -80,7 +80,7 @@ public class AuthResource { @Autowired private BubblePlanDAO planDAO; @Autowired private BubbleNodeDAO nodeDAO; @Autowired private BubbleConfiguration configuration; - @Autowired private AuthenticatorService authenticatorService; + @Autowired private StandardAuthenticatorService authenticatorService; @Autowired private PromotionService promoService; public Account updateLastLogin(Account account) { return accountDAO.update(account.setLastLogin()); } diff --git a/bubble-server/src/main/java/bubble/resources/account/MeResource.java b/bubble-server/src/main/java/bubble/resources/account/MeResource.java index da09ce45..effeb1b7 100644 --- a/bubble-server/src/main/java/bubble/resources/account/MeResource.java +++ b/bubble-server/src/main/java/bubble/resources/account/MeResource.java @@ -25,7 +25,7 @@ import bubble.resources.driver.DriversResource; import bubble.resources.notify.ReceivedNotificationsResource; import bubble.resources.notify.SentNotificationsResource; import bubble.server.BubbleConfiguration; -import bubble.service.account.AuthenticatorService; +import bubble.service.account.StandardAuthenticatorService; import bubble.service.account.StandardAccountMessageService; import bubble.service.account.download.AccountDownloadService; import bubble.service.boot.BubbleModelSetupService; @@ -80,7 +80,7 @@ public class MeResource { @Autowired private SessionDAO sessionDAO; @Autowired private AccountDownloadService downloadService; @Autowired private BubbleConfiguration configuration; - @Autowired private AuthenticatorService authenticatorService; + @Autowired private StandardAuthenticatorService authenticatorService; @Autowired private AccountMessageDAO messageDAO; @GET diff --git a/bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java b/bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java index 23a18751..50736037 100644 --- a/bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java +++ b/bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java @@ -26,7 +26,7 @@ import bubble.model.cloud.BubbleNetwork; import bubble.model.cloud.CloudService; import bubble.resources.account.AccountOwnedResource; import bubble.server.BubbleConfiguration; -import bubble.service.account.AuthenticatorService; +import bubble.service.account.StandardAuthenticatorService; import bubble.service.cloud.GeoService; import lombok.extern.slf4j.Slf4j; import org.cobbzilla.wizard.validation.ValidationResult; @@ -60,7 +60,7 @@ public class AccountPlansResource extends AccountOwnedResource