Log NetconfServer authentication fail when authProvider is missing. 27/20027/2
authorTomas Cere <tcere@cisco.com>
Mon, 11 May 2015 15:11:59 +0000 (17:11 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 19 May 2015 09:57:21 +0000 (09:57 +0000)
Change-Id: I43fef075fdf43624f1b83ddec16d77c129f98964
Signed-off-by: Tomas Cere <tcere@cisco.com>
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/osgi/AuthProviderTracker.java

index c473b70..f88e45f 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);
     }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.