Support auth* service integration for HttpTransport
[netconf.git] / transport / transport-http / src / main / java / org / opendaylight / netconf / transport / http / AuthHandlerFactory.java
diff --git a/transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/AuthHandlerFactory.java b/transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/AuthHandlerFactory.java
new file mode 100644 (file)
index 0000000..64dd896
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2024 PANTHEON.tech s.r.o. 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.netconf.transport.http;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * Factory building {@link AuthHandler} instances to serve requests authentication and authorization for new connections
+ * established.
+ */
+@FunctionalInterface
+public interface AuthHandlerFactory {
+    /**
+     * Builds {@link AuthHandler} instance.
+     *
+     * @return handler instance
+     */
+    @NonNull AuthHandler<?> create();
+}