From f4a4a0806bf361ccbd2d0f9bbdc34187cccba6c6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 14 Aug 2021 13:32:31 +0200 Subject: -more legwork for new auth method support --- src/include/anastasis.h | 9 ++++++++- src/include/anastasis_authorization_plugin.h | 2 ++ src/include/anastasis_service.h | 11 +++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/anastasis.h b/src/include/anastasis.h index 0caaf4e..f9782fd 100644 --- a/src/include/anastasis.h +++ b/src/include/anastasis.h @@ -131,7 +131,14 @@ enum ANASTASIS_ChallengeStatus /** * The rate limit for solving the challenge was exceeded. */ - ANASTASIS_CHALLENGE_STATUS_RATE_LIMIT_EXCEEDED + ANASTASIS_CHALLENGE_STATUS_RATE_LIMIT_EXCEEDED, + + /** + * The user did not satisfy the (external) authentication + * challenge in time. The request should be repeated + * later and may then succeed. + */ + ANASTASIS_CHALLENGE_STATUS_AUTH_TIMEOUT }; diff --git a/src/include/anastasis_authorization_plugin.h b/src/include/anastasis_authorization_plugin.h index 5e93175..c2f2c03 100644 --- a/src/include/anastasis_authorization_plugin.h +++ b/src/include/anastasis_authorization_plugin.h @@ -163,11 +163,13 @@ struct ANASTASIS_AuthorizationPlugin * to a video identification site. * * @param as authorization state + * @param timeout how long do we have to produce a reply * @param connection HTTP client request (for queuing response, such as redirection to video portal) * @return state of the request */ enum ANASTASIS_AUTHORIZATION_Result (*process)(struct ANASTASIS_AUTHORIZATION_State *as, + struct GNUNET_TIME_Absolute timeout, struct MHD_Connection *connection); diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h index 637e43b..a08f25b 100644 --- a/src/include/anastasis_service.h +++ b/src/include/anastasis_service.h @@ -466,9 +466,16 @@ enum ANASTASIS_KeyShareDownloadStatus /** * Too many attempts to solve the challenge were made in a short - * time. Try again laster. + * time. Try again later. */ - ANASTASIS_KSD_RATE_LIMIT_EXCEEDED + ANASTASIS_KSD_RATE_LIMIT_EXCEEDED, + + /** + * The user did not satisfy the (external) + * authentication check until the request timeout + * was reached. The client should try again later. + */ + ANASTASIS_KSD_AUTHENTICATION_TIMEOUT }; -- cgit v1.2.3