REORG: include: split common/uri_auth.h into haproxy/uri_auth{,-t}.h

Initially it looked like this could have been placed into auth.h or
stats.h but it's not the case as it's what makes the link between them
and the HTTP layer. However the file needed to be split in two. Quite
a number of call places were dropped because these were mostly leftovers
from the early days where the stats and cli were packed together.
diff --git a/include/common/uri_auth.h b/include/common/uri_auth.h
deleted file mode 100644
index 9250f54..0000000
--- a/include/common/uri_auth.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * URI-based user authentication using the HTTP basic method.
- *
- * Copyright 2006-2011 Willy Tarreau <w@1wt.eu>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef _COMMON_URI_AUTH_H
-#define _COMMON_URI_AUTH_H
-
-
-#include <haproxy/auth-t.h>
-#include <haproxy/api.h>
-
-/* This is a list of proxies we are allowed to see. Later, it should go in the
- * user list, but before this we need to support de/re-authentication.
- */
-struct stat_scope {
-	struct stat_scope *next;	/* next entry, NULL if none */
-	int px_len;			/* proxy name length */
-	char *px_id;			/* proxy id */
-};
-
-/* later we may link them to support multiple URI matching */
-struct uri_auth {
-	int uri_len;			/* the prefix length */
-	char *uri_prefix;		/* the prefix we want to match */
-	char *auth_realm;		/* the realm reported to the client */
-	char *node, *desc;		/* node name & description reported in this stats */
-	int refresh;			/* refresh interval for the browser (in seconds) */
-	unsigned int flags;		/* STAT_* flags from stats.h and for applet.ctx.stats.flags */
-	struct stat_scope *scope;	/* linked list of authorized proxies */
-	struct userlist *userlist;	/* private userlist to emulate legacy "stats auth user:password" */
-	struct list http_req_rules;	/* stats http-request rules : allow/deny/auth */
-	struct list admin_rules;	/* 'stats admin' rules (chained) */
-	struct uri_auth *next;		/* Used at deinit() to build a list of unique elements */
-};
-
-struct stats_admin_rule {
-	struct list list;	/* list linked to from the proxy */
-	struct acl_cond *cond;	/* acl condition to meet */
-};
-
-
-/* Various functions used to set the fields during the configuration parsing.
- * Please that all those function can initialize the root entry in order not to
- * force the user to respect a certain order in the configuration file.
- *
- * Default values are used during initialization. Check STATS_DEFAULT_* for
- * more information.
- */
-struct uri_auth *stats_check_init_uri_auth(struct uri_auth **root);
-struct uri_auth *stats_set_uri(struct uri_auth **root, char *uri);
-struct uri_auth *stats_set_realm(struct uri_auth **root, char *realm);
-struct uri_auth *stats_set_refresh(struct uri_auth **root, int interval);
-struct uri_auth *stats_set_flag(struct uri_auth **root, int flag);
-struct uri_auth *stats_add_auth(struct uri_auth **root, char *user);
-struct uri_auth *stats_add_scope(struct uri_auth **root, char *scope);
-struct uri_auth *stats_set_node(struct uri_auth **root, char *name);
-struct uri_auth *stats_set_desc(struct uri_auth **root, char *desc);
-
-#endif /* _COMMON_URI_AUTH_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
diff --git a/include/haproxy/uri_auth-t.h b/include/haproxy/uri_auth-t.h
new file mode 100644
index 0000000..2509791
--- /dev/null
+++ b/include/haproxy/uri_auth-t.h
@@ -0,0 +1,57 @@
+/*
+ * include/haproxy/uri_auth-t.h
+ * Definitions for URI-based user authentication using the HTTP basic method.
+ *
+ * Copyright 2006-2020 Willy Tarreau <w@1wt.eu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _HAPROXY_URI_AUTH_T_H
+#define _HAPROXY_URI_AUTH_T_H
+
+#include <haproxy/acl-t.h>
+#include <haproxy/auth-t.h>
+#include <haproxy/list-t.h>
+
+/* This is a list of proxies we are allowed to see. Later, it should go in the
+ * user list, but before this we need to support de/re-authentication.
+ */
+struct stat_scope {
+	struct stat_scope *next;	/* next entry, NULL if none */
+	int px_len;			/* proxy name length */
+	char *px_id;			/* proxy id */
+};
+
+/* later we may link them to support multiple URI matching */
+struct uri_auth {
+	int uri_len;			/* the prefix length */
+	char *uri_prefix;		/* the prefix we want to match */
+	char *auth_realm;		/* the realm reported to the client */
+	char *node, *desc;		/* node name & description reported in this stats */
+	int refresh;			/* refresh interval for the browser (in seconds) */
+	unsigned int flags;		/* STAT_* flags from stats.h and for applet.ctx.stats.flags */
+	struct stat_scope *scope;	/* linked list of authorized proxies */
+	struct userlist *userlist;	/* private userlist to emulate legacy "stats auth user:password" */
+	struct list http_req_rules;	/* stats http-request rules : allow/deny/auth */
+	struct list admin_rules;	/* 'stats admin' rules (chained) */
+	struct uri_auth *next;		/* Used at deinit() to build a list of unique elements */
+};
+
+struct stats_admin_rule {
+	struct list list;	/* list linked to from the proxy */
+	struct acl_cond *cond;	/* acl condition to meet */
+};
+
+#endif /* _HAPROXY_URI_AUTH_T_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/include/haproxy/uri_auth.h b/include/haproxy/uri_auth.h
new file mode 100644
index 0000000..27dca02
--- /dev/null
+++ b/include/haproxy/uri_auth.h
@@ -0,0 +1,44 @@
+/*
+ * include/haproxy/uri_auth.h
+ * Functions for URI-based user authentication using the HTTP basic method.
+ *
+ * Copyright 2006-2020 Willy Tarreau <w@1wt.eu>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _HAPROXY_URI_AUTH_H
+#define _HAPROXY_URI_AUTH_H
+
+#include <haproxy/api.h>
+#include <haproxy/uri_auth-t.h>
+
+/* Various functions used to set the fields during the configuration parsing.
+ * Please that all those function can initialize the root entry in order not to
+ * force the user to respect a certain order in the configuration file.
+ *
+ * Default values are used during initialization. Check STATS_DEFAULT_* for
+ * more information.
+ */
+struct uri_auth *stats_check_init_uri_auth(struct uri_auth **root);
+struct uri_auth *stats_set_uri(struct uri_auth **root, char *uri);
+struct uri_auth *stats_set_realm(struct uri_auth **root, char *realm);
+struct uri_auth *stats_set_refresh(struct uri_auth **root, int interval);
+struct uri_auth *stats_set_flag(struct uri_auth **root, int flag);
+struct uri_auth *stats_add_auth(struct uri_auth **root, char *user);
+struct uri_auth *stats_add_scope(struct uri_auth **root, char *scope);
+struct uri_auth *stats_set_node(struct uri_auth **root, char *name);
+struct uri_auth *stats_set_desc(struct uri_auth **root, char *desc);
+
+#endif /* _HAPROXY_URI_AUTH_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/src/acl.c b/src/acl.c
index ea0a54d..259b79a 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -20,7 +20,6 @@
 #include <haproxy/list.h>
 #include <haproxy/pattern.h>
 #include <haproxy/tools.h>
-#include <common/uri_auth.h>
 
 #include <haproxy/global.h>
 
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index 0c6fa35..44474fd 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -12,7 +12,7 @@
 #include <unistd.h>
 
 #include <common/cfgparse.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth.h>
 
 #include <haproxy/acl.h>
 #include <haproxy/capture-t.h>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 376430f..5f27877 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -58,7 +58,7 @@
 #include <haproxy/session.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/namespace.h>
 #include <haproxy/task.h>
 #include <haproxy/thread.h>
diff --git a/src/cli.c b/src/cli.c
index a520787..186aad4 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -42,7 +42,6 @@
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
-#include <common/uri_auth.h>
 #include <haproxy/version.h>
 #include <haproxy/base64.h>
 
diff --git a/src/haproxy.c b/src/haproxy.c
index b420df9..26702a9 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -107,7 +107,7 @@
 #include <haproxy/signal.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/version.h>
 #include <haproxy/task.h>
 #include <haproxy/thread.h>
diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c
index 48a0514..f4ac3d5 100644
--- a/src/hlua_fcn.c
+++ b/src/hlua_fcn.c
@@ -23,7 +23,6 @@
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
 #include <haproxy/time.h>
-#include <common/uri_auth.h>
 
 #include <types/cli.h>
 #include <types/proxy.h>
diff --git a/src/http_act.c b/src/http_act.c
index 844eeaf..37966f3 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -30,7 +30,7 @@
 #include <haproxy/regex.h>
 #include <haproxy/sample.h>
 #include <haproxy/tools.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/version.h>
 
 #include <haproxy/capture-t.h>
diff --git a/src/http_ana.c b/src/http_ana.c
index 8555293..37ae648 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -21,8 +21,8 @@
 #include <haproxy/htx.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/vars.h>
-#include <common/uri_auth.h>
 
 #include <haproxy/capture-t.h>
 
diff --git a/src/sample.c b/src/sample.c
index 8fd043b..23f7bf2 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -29,8 +29,8 @@
 #include <haproxy/regex.h>
 #include <haproxy/sample.h>
 #include <haproxy/tools.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/vars.h>
-#include <common/uri_auth.h>
 #include <haproxy/base64.h>
 
 #include <haproxy/arg.h>
diff --git a/src/stats.c b/src/stats.c
index bc9aaee..0bb7481 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -45,7 +45,7 @@
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth-t.h>
 #include <haproxy/version.h>
 #include <haproxy/base64.h>
 
diff --git a/src/uri_auth.c b/src/uri_auth.c
index a2c1426..236f578 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -15,7 +15,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/base64.h>
-#include <common/uri_auth.h>
+#include <haproxy/uri_auth.h>
 
 #include <types/stats.h>
 #include <proto/log.h>