From 96aaf2d9ca7b078ff97785cfbf7b619aae165ce0 Mon Sep 17 00:00:00 2001 From: dzmipt Date: Fri, 22 Mar 2024 19:57:11 +0100 Subject: [PATCH] fix implmenation in case of plugins absence --- src/studio/core/AuthenticationManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/studio/core/AuthenticationManager.java b/src/studio/core/AuthenticationManager.java index 839462c8..f07e513b 100644 --- a/src/studio/core/AuthenticationManager.java +++ b/src/studio/core/AuthenticationManager.java @@ -35,6 +35,8 @@ public synchronized static AuthenticationManager getInstance() { } private void init() { + loadPlugins(); + List auths = new ArrayList<>(classMap.keySet()); auths.remove(DefaultAuthenticationMechanism.NAME); Collections.sort(auths); @@ -42,7 +44,8 @@ private void init() { authMechanisms = auths.toArray(new String[0]); } - private AuthenticationManager() { + + private void loadPlugins() { DefaultAuthenticationMechanism dam = new DefaultAuthenticationMechanism(); classMap.put(dam.getMechanismName(),dam.getClass()); @@ -92,7 +95,9 @@ private AuthenticationManager() { log.error("Error loading plugin {}", filename, e); } } + } + private AuthenticationManager() { init(); } }