From: Schanzenbach, Martin Date: Thu, 27 Sep 2018 22:17:58 +0000 (+0200) Subject: revert X-Git-Tag: v0.11.0~241^2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ec50a665dc884f7997419d0351ae8ade9c1aeabe;p=oweals%2Fgnunet.git revert --- diff --git a/src/rest-plugins/plugin_rest_openid_connect.c b/src/rest-plugins/plugin_rest_openid_connect.c index 500ecec11..6456458a6 100644 --- a/src/rest-plugins/plugin_rest_openid_connect.c +++ b/src/rest-plugins/plugin_rest_openid_connect.c @@ -128,7 +128,7 @@ /** * OIDC cookie header information key */ -#define OIDC_AUTHORIZATION_HEADER_KEY "Authorization" +#define OIDC_AUTHORIZATION_HEADER_KEY "authorization" /** * OIDC cookie header information key @@ -1381,6 +1381,7 @@ check_authorization (struct RequestHandle *handle, if (0 != strcmp ("Basic", credentials)) { handle->emsg=GNUNET_strdup("invalid_client"); + handle->edesc = GNUNET_strdup ("1"); handle->response_code = MHD_HTTP_UNAUTHORIZED; return GNUNET_SYSERR; } @@ -1388,6 +1389,7 @@ check_authorization (struct RequestHandle *handle, if (NULL == credentials) { handle->emsg=GNUNET_strdup("invalid_client"); + handle->edesc = GNUNET_strdup ("2"); handle->response_code = MHD_HTTP_UNAUTHORIZED; return GNUNET_SYSERR; } @@ -1406,6 +1408,7 @@ check_authorization (struct RequestHandle *handle, { GNUNET_free_non_null(basic_authorization); handle->emsg=GNUNET_strdup("invalid_client"); + handle->edesc = GNUNET_strdup ("Wrong username"); handle->response_code = MHD_HTTP_UNAUTHORIZED; return GNUNET_SYSERR; } @@ -1414,6 +1417,7 @@ check_authorization (struct RequestHandle *handle, { GNUNET_free_non_null(basic_authorization); handle->emsg=GNUNET_strdup("invalid_client"); + handle->edesc = GNUNET_strdup (client_id); handle->response_code = MHD_HTTP_UNAUTHORIZED; return GNUNET_SYSERR; } @@ -1427,6 +1431,7 @@ check_authorization (struct RequestHandle *handle, { GNUNET_free_non_null(basic_authorization); GNUNET_free(expected_pass); + handle->edesc = GNUNET_strdup (pass); handle->emsg=GNUNET_strdup("invalid_client"); handle->response_code = MHD_HTTP_UNAUTHORIZED; return GNUNET_SYSERR;