challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

commit ea2c04367fe8ad5408269b25deae31e80a3ebc48
parent eef7efd70eef1dceee257a69ef74e98fd2aab4b5
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Thu,  9 Jul 2026 20:58:29 +0200

align status codes better with RFC 6749

Diffstat:
Msrc/challenger/challenger-httpd_token.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c @@ -290,7 +290,7 @@ CH_handler_token (struct CH_HandlerContext *hc, return CH_reply_with_oauth_error ( hc->connection, MHD_HTTP_BAD_REQUEST, - "invalid_client", + "invalid_request", TALER_EC_GENERIC_PARAMETER_MISSING, "client_secret"); } @@ -300,7 +300,7 @@ CH_handler_token (struct CH_HandlerContext *hc, return CH_reply_with_oauth_error ( hc->connection, MHD_HTTP_BAD_REQUEST, - "invalid_client", + "invalid_request", TALER_EC_GENERIC_PARAMETER_MISSING, "client_id"); } @@ -331,7 +331,7 @@ CH_handler_token (struct CH_HandlerContext *hc, return CH_reply_with_oauth_error ( hc->connection, MHD_HTTP_BAD_REQUEST, - "invalid_client", + "invalid_request", TALER_EC_GENERIC_PARAMETER_MALFORMED, "client_id"); } @@ -355,9 +355,10 @@ CH_handler_token (struct CH_HandlerContext *hc, return MHD_NO; case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: GNUNET_break_op (0); + /* FIXME: RFC 6749 $5.2 mandates adding WWW-Authenticate header */ return CH_reply_with_oauth_error ( hc->connection, - MHD_HTTP_NOT_FOUND, + MHD_HTTP_UNAUTHORIZED, "invalid_client", TALER_EC_CHALLENGER_GENERIC_CLIENT_UNKNOWN, NULL); @@ -369,6 +370,7 @@ CH_handler_token (struct CH_HandlerContext *hc, bc->redirect_uri)) ) { GNUNET_break_op (0); + /* FIXME: RFC 6749 $5.2 mandates adding WWW-Authenticate header */ return CH_reply_with_oauth_error ( hc->connection, MHD_HTTP_UNAUTHORIZED,