BUG-1617 Extract AuthProvider from netconf ssh
[controller.git] / opendaylight / netconf / netconf-auth / src / main / java / org / opendaylight / controller / netconf / auth / AuthProvider.java
diff --git a/opendaylight/netconf/netconf-auth/src/main/java/org/opendaylight/controller/netconf/auth/AuthProvider.java b/opendaylight/netconf/netconf-auth/src/main/java/org/opendaylight/controller/netconf/auth/AuthProvider.java
new file mode 100644 (file)
index 0000000..0ae7423
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.controller.netconf.auth;
+
+/**
+ * Authentication Service definition for netconf.
+ */
+public interface AuthProvider {
+
+    /**
+     * Authenticate user by username/password.
+     *
+     * @param username username
+     * @param password password
+     * @return true if authentication is successful, false otherwise
+     */
+    boolean authenticated(String username, String password);
+
+}