aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim')
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index 69bbb7af7..faa6e8351 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -856,6 +856,7 @@ login_redirect (void *cls)
856{ 856{
857 char *login_base_url; 857 char *login_base_url;
858 char *new_redirect; 858 char *new_redirect;
859 char *tmp;
859 struct MHD_Response *resp; 860 struct MHD_Response *resp;
860 struct GNUNET_Buffer buf = { 0 }; 861 struct GNUNET_Buffer buf = { 0 };
861 struct RequestHandle *handle = cls; 862 struct RequestHandle *handle = cls;
@@ -874,21 +875,32 @@ login_redirect (void *cls)
874 "&%s=%s", 875 "&%s=%s",
875 OIDC_CLIENT_ID_KEY, 876 OIDC_CLIENT_ID_KEY,
876 handle->oidc->client_id); 877 handle->oidc->client_id);
878 GNUNET_STRINGS_urlencode (handle->oidc->redirect_uri,
879 strlen (handle->oidc->redirect_uri),
880 &tmp);
877 GNUNET_buffer_write_fstr (&buf, 881 GNUNET_buffer_write_fstr (&buf,
878 "&%s=%s", 882 "&%s=%s",
879 OIDC_REDIRECT_URI_KEY, 883 OIDC_REDIRECT_URI_KEY,
880 handle->oidc->redirect_uri); 884 tmp);
881 885 GNUNET_free (tmp);
886 GNUNET_STRINGS_urlencode (handle->oidc->scope,
887 strlen (handle->oidc->scope),
888 &tmp);
882 GNUNET_buffer_write_fstr (&buf, 889 GNUNET_buffer_write_fstr (&buf,
883 "&%s=%s", 890 "&%s=%s",
884 OIDC_SCOPE_KEY, 891 OIDC_SCOPE_KEY,
885 handle->oidc->scope); 892 tmp);
893 GNUNET_free (tmp);
886 if (NULL != handle->oidc->state) 894 if (NULL != handle->oidc->state)
887 { 895 {
896 GNUNET_STRINGS_urlencode (handle->oidc->state,
897 strlen (handle->oidc->state),
898 &tmp);
888 GNUNET_buffer_write_fstr (&buf, 899 GNUNET_buffer_write_fstr (&buf,
889 "&%s=%s", 900 "&%s=%s",
890 OIDC_STATE_KEY, 901 OIDC_STATE_KEY,
891 handle->oidc->state); 902 handle->oidc->state);
903 GNUNET_free (tmp);
892 } 904 }
893 if (NULL != handle->oidc->code_challenge) 905 if (NULL != handle->oidc->code_challenge)
894 { 906 {
@@ -906,10 +918,14 @@ login_redirect (void *cls)
906 } 918 }
907 if (NULL != handle->oidc->claims) 919 if (NULL != handle->oidc->claims)
908 { 920 {
921 GNUNET_STRINGS_urlencode (handle->oidc->claims,
922 strlen (handle->oidc->claims),
923 &tmp);
909 GNUNET_buffer_write_fstr (&buf, 924 GNUNET_buffer_write_fstr (&buf,
910 "&%s=%s", 925 "&%s=%s",
911 OIDC_CLAIMS_KEY, 926 OIDC_CLAIMS_KEY,
912 handle->oidc->claims); 927 tmp);
928 GNUNET_free (tmp);
913 } 929 }
914 new_redirect = GNUNET_buffer_reap_str (&buf); 930 new_redirect = GNUNET_buffer_reap_str (&buf);
915 resp = GNUNET_REST_create_response (""); 931 resp = GNUNET_REST_create_response ("");