Log NetconfServer authentication fail when authProvider is missing.
[controller.git] / opendaylight / netconf / netconf-ssh / src / main / java / org / opendaylight / controller / netconf / ssh / osgi / AuthProviderTracker.java
index c473b70eee7a981dadd71f671ec462abcab215cd..f88e45f592399440df7eafbfb6715a4d83bd402f 100644 (file)
@@ -86,6 +86,10 @@ final class AuthProviderTracker implements ServiceTrackerCustomizer<AuthProvider
 
     @Override
     public boolean authenticate(final String username, final String password, final ServerSession session) {
-        return authProvider == null ? false : authProvider.authenticated(username, password);
+        if (authProvider == null) {
+            LOG.warn("AuthProvider is missing, failing authentication");
+            return false;
+        }
+        return authProvider.authenticated(username, password);
     }
 }