aboutsummaryrefslogtreecommitdiff
path: root/src/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/service')
-rw-r--r--src/service/rest/Makefile.am13
-rw-r--r--src/service/rest/gnunet-rest-server.c8
2 files changed, 18 insertions, 3 deletions
diff --git a/src/service/rest/Makefile.am b/src/service/rest/Makefile.am
index 7cc85aa71..60769e366 100644
--- a/src/service/rest/Makefile.am
+++ b/src/service/rest/Makefile.am
@@ -24,6 +24,13 @@ libexec_PROGRAMS = \
24EXTRA_DIST = \ 24EXTRA_DIST = \
25 rest.conf 25 rest.conf
26 26
27if HAVE_JOSE
28OPENID_PLUGIN = \
29 openid_plugin.c \
30 oidc_helper.c
31OPENID_JOSE_LIBS = -ljose
32endif
33
27gnunet_rest_server_SOURCES = \ 34gnunet_rest_server_SOURCES = \
28 gnunet-rest-server.c \ 35 gnunet-rest-server.c \
29 config_plugin.c \ 36 config_plugin.c \
@@ -31,19 +38,19 @@ gnunet_rest_server_SOURCES = \
31 identity_plugin.c \ 38 identity_plugin.c \
32 namestore_plugin.c \ 39 namestore_plugin.c \
33 gns_plugin.c \ 40 gns_plugin.c \
34 openid_plugin.c \ 41 $(OPENID_PLUGIN) \
35 oidc_helper.c \
36 reclaim_plugin.c json_reclaim.c 42 reclaim_plugin.c json_reclaim.c
37gnunet_rest_server_LDADD = \ 43gnunet_rest_server_LDADD = \
38 $(top_builddir)/src/lib/util/libgnunetutil.la \ 44 $(top_builddir)/src/lib/util/libgnunetutil.la \
39 $(top_builddir)/src/lib/json/libgnunetjson.la \ 45 $(top_builddir)/src/lib/json/libgnunetjson.la \
46 $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la \
40 $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecordjson.la \ 47 $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecordjson.la \
41 $(top_builddir)/src/service/identity/libgnunetidentity.la \ 48 $(top_builddir)/src/service/identity/libgnunetidentity.la \
42 $(top_builddir)/src/service/namestore/libgnunetnamestore.la \ 49 $(top_builddir)/src/service/namestore/libgnunetnamestore.la \
43 $(top_builddir)/src/service/gns/libgnunetgns.la \ 50 $(top_builddir)/src/service/gns/libgnunetgns.la \
44 $(top_builddir)/src/service/reclaim/libgnunetreclaim.la \ 51 $(top_builddir)/src/service/reclaim/libgnunetreclaim.la \
45 libgnunetrest.la \ 52 libgnunetrest.la \
46 -ljose \ 53 $(OPENID_JOSE_LIBS) \
47 -ljansson \ 54 -ljansson \
48 $(LIBGCRYPT_LIBS) \ 55 $(LIBGCRYPT_LIBS) \
49 $(GN_LIBINTL) $(MHD_LIBS) 56 $(GN_LIBINTL) $(MHD_LIBS)
diff --git a/src/service/rest/gnunet-rest-server.c b/src/service/rest/gnunet-rest-server.c
index 59b997efd..ce81704ae 100644
--- a/src/service/rest/gnunet-rest-server.c
+++ b/src/service/rest/gnunet-rest-server.c
@@ -34,7 +34,9 @@
34#include "identity_plugin.h" 34#include "identity_plugin.h"
35#include "namestore_plugin.h" 35#include "namestore_plugin.h"
36#include "gns_plugin.h" 36#include "gns_plugin.h"
37#ifdef HAVE_JOSE
37#include "openid_plugin.h" 38#include "openid_plugin.h"
39#endif
38#include "reclaim_plugin.h" 40#include "reclaim_plugin.h"
39 41
40/** 42/**
@@ -263,7 +265,9 @@ struct GNUNET_REST_Plugin *copying_plugin;
263struct GNUNET_REST_Plugin *identity_plugin; 265struct GNUNET_REST_Plugin *identity_plugin;
264struct GNUNET_REST_Plugin *namestore_plugin; 266struct GNUNET_REST_Plugin *namestore_plugin;
265struct GNUNET_REST_Plugin *gns_plugin; 267struct GNUNET_REST_Plugin *gns_plugin;
268#ifdef HAVE_JOSE
266struct GNUNET_REST_Plugin *openid_plugin; 269struct GNUNET_REST_Plugin *openid_plugin;
270#endif
267struct GNUNET_REST_Plugin *reclaim_plugin; 271struct GNUNET_REST_Plugin *reclaim_plugin;
268 272
269/* ************************* Global helpers ********************* */ 273/* ************************* Global helpers ********************* */
@@ -1016,7 +1020,9 @@ do_shutdown (void *cls)
1016 REST_copying_done (copying_plugin); 1020 REST_copying_done (copying_plugin);
1017 REST_identity_done (identity_plugin); 1021 REST_identity_done (identity_plugin);
1018 REST_gns_done (gns_plugin); 1022 REST_gns_done (gns_plugin);
1023#ifdef HAVE_JOSE
1019 REST_openid_done (openid_plugin); 1024 REST_openid_done (openid_plugin);
1025#endif
1020 REST_reclaim_done (reclaim_plugin); 1026 REST_reclaim_done (reclaim_plugin);
1021 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); 1027 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n");
1022 kill_httpd (); 1028 kill_httpd ();
@@ -1397,11 +1403,13 @@ run (void *cls,
1397 { 1403 {
1398 GNUNET_SCHEDULER_shutdown (); 1404 GNUNET_SCHEDULER_shutdown ();
1399 } 1405 }
1406#ifdef HAVE_JOSE
1400 struct GNUNET_REST_Plugin *openid_plugin = REST_openid_init (cfg); 1407 struct GNUNET_REST_Plugin *openid_plugin = REST_openid_init (cfg);
1401 if (GNUNET_OK != setup_plugin (openid_plugin->name, &REST_openid_process_request, openid_plugin)) 1408 if (GNUNET_OK != setup_plugin (openid_plugin->name, &REST_openid_process_request, openid_plugin))
1402 { 1409 {
1403 GNUNET_SCHEDULER_shutdown (); 1410 GNUNET_SCHEDULER_shutdown ();
1404 } 1411 }
1412#endif
1405 struct GNUNET_REST_Plugin *reclaim_plugin = REST_reclaim_init (cfg); 1413 struct GNUNET_REST_Plugin *reclaim_plugin = REST_reclaim_init (cfg);
1406 if (GNUNET_OK != setup_plugin (reclaim_plugin->name, &REST_reclaim_process_request, reclaim_plugin)) 1414 if (GNUNET_OK != setup_plugin (reclaim_plugin->name, &REST_reclaim_process_request, reclaim_plugin))
1407 { 1415 {