challenger

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

commit dd908742bdd543d463b465f8b87c4cc801d4e61a
parent 72d5bff6200f204896cddcd315945bedca78f3e6
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  4 May 2025 15:21:04 +0200

improve logging, fix setting request to suspended

Diffstat:
Msrc/challenger/challenger-httpd_challenge.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/challenger/challenger-httpd_challenge.c b/src/challenger/challenger-httpd_challenge.c @@ -462,6 +462,7 @@ send_tan (struct ChallengeContext *bc) &child_done_cb, bc); MHD_suspend_connection (bc->hc->connection); + bc->suspended = GNUNET_YES; GNUNET_CONTAINER_DLL_insert (bc_head, bc_tail, bc); @@ -857,6 +858,9 @@ CH_handler_challenge (struct CH_HandlerContext *hc, break; } bc->db_finished = true; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Database interaction done (challenge %s)\n", + bc->solved ? "solved" : "unsolved"); if (bc->solved) { struct MHD_Response *response; @@ -906,7 +910,11 @@ CH_handler_challenge (struct CH_HandlerContext *hc, /* (Re)transmit PIN/TAN */ send_tan (bc); if (GNUNET_YES == bc->suspended) + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Suspending request after PIN transmission\n"); return MHD_YES; + } /* Did we already try to generate a response? */ if (GNUNET_OK != bc->status) return (GNUNET_NO == bc->status) @@ -921,6 +929,9 @@ CH_handler_challenge (struct CH_HandlerContext *hc, unsigned int http_status; MHD_RESULT res; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Returning success from challenge with %u attempts left\n", + (unsigned int) bc->pin_attempts_left); args = GNUNET_JSON_PACK ( GNUNET_JSON_pack_uint64 ("attempts_left", bc->pin_attempts_left),