gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-challenger] branch master updated: rename /login to /authorize


From: gnunet
Subject: [taler-challenger] branch master updated: rename /login to /authorize
Date: Mon, 08 May 2023 20:16:37 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository challenger.

The following commit(s) were added to refs/heads/master by this push:
     new f2f46a1  rename /login to /authorize
f2f46a1 is described below

commit f2f46a1df0cdb5dfb5beaba68296c309fde6a85d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon May 8 20:16:23 2023 +0200

    rename /login to /authorize
---
 src/challenger/Makefile.am                         |  2 +-
 src/challenger/challenger-httpd.c                  | 10 +++----
 ...-httpd_login.c => challenger-httpd_authorize.c} | 32 +++++++++++-----------
 ...-httpd_login.h => challenger-httpd_authorize.h} |  6 ++--
 src/challenger/test-challenger.sh                  |  2 +-
 src/challengerdb/Makefile.am                       |  2 +-
 .../{pg_login_start.c => pg_authorize_start.c}     | 26 +++++++++---------
 .../{pg_login_start.h => pg_authorize_start.h}     | 20 +++++++-------
 src/challengerdb/plugin_challengerdb_postgres.c    |  6 ++--
 src/include/challenger_database_plugin.h           | 16 +++++------
 10 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/src/challenger/Makefile.am b/src/challenger/Makefile.am
index 4e1ad29..110e464 100644
--- a/src/challenger/Makefile.am
+++ b/src/challenger/Makefile.am
@@ -37,11 +37,11 @@ challenger_admin_LDADD = \
 
 challenger_httpd_SOURCES = \
   challenger-httpd.c challenger-httpd.h \
+  challenger-httpd_authorize.c challenger-httpd_authorize.h \
   challenger-httpd_challenge.c challenger-httpd_challenge.h \
   challenger-httpd_common.c challenger-httpd_common.h \
   challenger-httpd_config.c challenger-httpd_config.h \
   challenger-httpd_info.c challenger-httpd_info.h \
-  challenger-httpd_login.c challenger-httpd_login.h \
   challenger-httpd_mhd.c challenger-httpd_mhd.h \
   challenger-httpd_setup.c challenger-httpd_setup.h \
   challenger-httpd_solve.c challenger-httpd_solve.h \
diff --git a/src/challenger/challenger-httpd.c 
b/src/challenger/challenger-httpd.c
index f11432f..00c0628 100644
--- a/src/challenger/challenger-httpd.c
+++ b/src/challenger/challenger-httpd.c
@@ -27,7 +27,7 @@
 #include "challenger-httpd_challenge.h"
 #include "challenger-httpd_info.h"
 #include "challenger-httpd_setup.h"
-#include "challenger-httpd_login.h"
+#include "challenger-httpd_authorize.h"
 #include "challenger-httpd_mhd.h"
 #include "challenger-httpd_solve.h"
 #include "challenger-httpd_token.h"
@@ -177,14 +177,14 @@ url_handler (void *cls,
       .handler = &CH_handler_setup
     },
     {
-      .url = "/login/",
+      .url = "/authorize/",
       .method = MHD_HTTP_METHOD_GET,
-      .handler = &CH_handler_login
+      .handler = &CH_handler_authorize
     },
     {
-      .url = "/login/",
+      .url = "/authorize/",
       .method = MHD_HTTP_METHOD_POST,
-      .handler = &CH_handler_login
+      .handler = &CH_handler_authorize
     },
     {
       .url = "/challenge/",
diff --git a/src/challenger/challenger-httpd_login.c 
b/src/challenger/challenger-httpd_authorize.c
similarity index 89%
rename from src/challenger/challenger-httpd_login.c
rename to src/challenger/challenger-httpd_authorize.c
index 5e13bfd..eb25779 100644
--- a/src/challenger/challenger-httpd_login.c
+++ b/src/challenger/challenger-httpd_authorize.c
@@ -14,21 +14,21 @@
   Challenger; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
 */
 /**
- * @file challenger-httpd_login.c
- * @brief functions to handle incoming requests for logins
+ * @file challenger-httpd_authorize.c
+ * @brief functions to handle incoming requests for authorizations
  * @author Christian Grothoff
  */
 #include "platform.h"
 #include "challenger-httpd.h"
 #include <gnunet/gnunet_util_lib.h>
 #include <taler/taler_templating_lib.h>
-#include "challenger-httpd_login.h"
+#include "challenger-httpd_authorize.h"
 
 
 MHD_RESULT
-CH_handler_login (struct CH_HandlerContext *hc,
-                  const char *upload_data,
-                  size_t *upload_data_size)
+CH_handler_authorize (struct CH_HandlerContext *hc,
+                      const char *upload_data,
+                      size_t *upload_data_size)
 {
   const char *response_type;
   unsigned long long client_id;
@@ -134,16 +134,16 @@ CH_handler_login (struct CH_HandlerContext *hc,
     uint32_t address_attempts_left;
     enum GNUNET_DB_QueryStatus qs;
 
-    /* login_start will return 0 if a 'redirect_uri' was
+    /* authorize_start will return 0 if a 'redirect_uri' was
        configured for the client and this one differs. */
-    qs = CH_db->login_start (CH_db->cls,
-                             &nonce,
-                             client_id,
-                             scope,
-                             state,
-                             redirect_uri,
-                             &last_address,
-                             &address_attempts_left);
+    qs = CH_db->authorize_start (CH_db->cls,
+                                 &nonce,
+                                 client_id,
+                                 scope,
+                                 state,
+                                 redirect_uri,
+                                 &last_address,
+                                 &address_attempts_left);
     switch (qs)
     {
     case GNUNET_DB_STATUS_HARD_ERROR:
@@ -152,7 +152,7 @@ CH_handler_login (struct CH_HandlerContext *hc,
                                            "internal-error",
                                            MHD_HTTP_INTERNAL_SERVER_ERROR,
                                            TALER_EC_GENERIC_DB_STORE_FAILED,
-                                           "login_start");
+                                           "authorize_start");
     case GNUNET_DB_STATUS_SOFT_ERROR:
       GNUNET_break (0);
       return MHD_NO;
diff --git a/src/challenger/challenger-httpd_login.h 
b/src/challenger/challenger-httpd_authorize.h
similarity index 89%
rename from src/challenger/challenger-httpd_login.h
rename to src/challenger/challenger-httpd_authorize.h
index 37e0131..7be6bc1 100644
--- a/src/challenger/challenger-httpd_login.h
+++ b/src/challenger/challenger-httpd_authorize.h
@@ -33,9 +33,9 @@
  * @return MHD result code
  */
 MHD_RESULT
-CH_handler_login (struct CH_HandlerContext *hc,
-                  const char *upload_data,
-                  size_t *upload_data_size);
+CH_handler_authorize (struct CH_HandlerContext *hc,
+                      const char *upload_data,
+                      size_t *upload_data_size);
 
 
 #endif
diff --git a/src/challenger/test-challenger.sh 
b/src/challenger/test-challenger.sh
index e873e07..e3d5c5f 100755
--- a/src/challenger/test-challenger.sh
+++ b/src/challenger/test-challenger.sh
@@ -97,7 +97,7 @@ CLIENT_STATE="the-client-state"
 CLIENT_SCOPE="the-client-scope"
 
 echo -n "Initiating user login..."
-STATUS=$(curl "${BURL}/login/${NONCE}" \
+STATUS=$(curl "${BURL}/authorize/${NONCE}" \
     -G \
     --data-urlencode "response_type=code" \
     --data-urlencode "client_id=${CLIENT_ID}" \
diff --git a/src/challengerdb/Makefile.am b/src/challengerdb/Makefile.am
index 11a41b4..f481f85 100644
--- a/src/challengerdb/Makefile.am
+++ b/src/challengerdb/Makefile.am
@@ -63,7 +63,7 @@ libchallenger_plugin_db_postgres_la_SOURCES = \
   pg_info_get_grant.h pg_info_get_grant.c \
   pg_token_add_grant.h pg_token_add_grant.c \
   pg_setup_nonce.h pg_setup_nonce.c \
-  pg_login_start.h pg_login_start.c \
+  pg_authorize_start.h pg_authorize_start.c \
   pg_challenge_set_address_and_pin.h pg_challenge_set_address_and_pin.c \
   pg_validate_solve_pin.h pg_validate_solve_pin.c \
   pg_validation_get.h pg_validation_get.c \
diff --git a/src/challengerdb/pg_login_start.c 
b/src/challengerdb/pg_authorize_start.c
similarity index 77%
rename from src/challengerdb/pg_login_start.c
rename to src/challengerdb/pg_authorize_start.c
index 48d7d12..87e317e 100644
--- a/src/challengerdb/pg_login_start.c
+++ b/src/challengerdb/pg_authorize_start.c
@@ -14,27 +14,27 @@
    Challenger; see the file COPYING.  If not, see 
<http://www.gnu.org/licenses/>
  */
 /**
- * @file challengerdb/pg_login_start.c
- * @brief Implementation of the login_start function for Postgres
+ * @file challengerdb/pg_authorize_start.c
+ * @brief Implementation of the authorize_start function for Postgres
  * @author Christian Grothoff
  */
 #include "platform.h"
 #include <taler/taler_error_codes.h>
 #include <taler/taler_dbevents.h>
 #include <taler/taler_pq_lib.h>
-#include "pg_login_start.h"
+#include "pg_authorize_start.h"
 #include "pg_helper.h"
 
 
 enum GNUNET_DB_QueryStatus
-CH_PG_login_start (void *cls,
-                   const struct CHALLENGER_ValidationNonceP *nonce,
-                   uint64_t client_id,
-                   const char *client_scope,
-                   const char *client_state,
-                   const char *client_redirect_url,
-                   char **last_address,
-                   uint32_t *address_attempts_left)
+CH_PG_authorize_start (void *cls,
+                       const struct CHALLENGER_ValidationNonceP *nonce,
+                       uint64_t client_id,
+                       const char *client_scope,
+                       const char *client_state,
+                       const char *client_redirect_url,
+                       char **last_address,
+                       uint32_t *address_attempts_left)
 {
   struct PostgresClosure *pg = cls;
   struct GNUNET_PQ_QueryParam params[] = {
@@ -59,7 +59,7 @@ CH_PG_login_start (void *cls,
 
   *last_address = NULL;
   PREPARE (pg,
-           "login_start_validation",
+           "authorize_start_validation",
            "UPDATE validations SET"
            "  client_scope=$3"
            " ,client_state=$4"
@@ -71,7 +71,7 @@ CH_PG_login_start (void *cls,
            "   address"
            "  ,address_attempts_left;");
   return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
-                                                   "login_start_validation",
+                                                   
"authorize_start_validation",
                                                    params,
                                                    rs);
 }
diff --git a/src/challengerdb/pg_login_start.h 
b/src/challengerdb/pg_authorize_start.h
similarity index 78%
rename from src/challengerdb/pg_login_start.h
rename to src/challengerdb/pg_authorize_start.h
index c0d3695..1b65f8b 100644
--- a/src/challengerdb/pg_login_start.h
+++ b/src/challengerdb/pg_authorize_start.h
@@ -14,8 +14,8 @@
    Challenger; see the file COPYING.  If not, see 
<http://www.gnu.org/licenses/>
  */
 /**
- * @file challengerdb/pg_login_start.h
- * @brief implementation of the login_start function for Postgres
+ * @file challengerdb/pg_authorize_start.h
+ * @brief implementation of the authorize_start function for Postgres
  * @author Christian Grothoff
  */
 #ifndef PG_LOGIN_START_H
@@ -46,14 +46,14 @@
  *   #GNUNET_DB_STATUS_HARD_ERROR on failure
  */
 enum GNUNET_DB_QueryStatus
-CH_PG_login_start (void *cls,
-                   const struct CHALLENGER_ValidationNonceP *nonce,
-                   uint64_t client_id,
-                   const char *client_scope,
-                   const char *client_state,
-                   const char *client_redirect_url,
-                   char **last_address,
-                   uint32_t *address_attempts_left);
+CH_PG_authorize_start (void *cls,
+                       const struct CHALLENGER_ValidationNonceP *nonce,
+                       uint64_t client_id,
+                       const char *client_scope,
+                       const char *client_state,
+                       const char *client_redirect_url,
+                       char **last_address,
+                       uint32_t *address_attempts_left);
 
 
 #endif
diff --git a/src/challengerdb/plugin_challengerdb_postgres.c 
b/src/challengerdb/plugin_challengerdb_postgres.c
index 68c0c89..3d79e41 100644
--- a/src/challengerdb/plugin_challengerdb_postgres.c
+++ b/src/challengerdb/plugin_challengerdb_postgres.c
@@ -32,7 +32,7 @@
 #include "pg_token_add_grant.h"
 #include "pg_client_check.h"
 #include "pg_setup_nonce.h"
-#include "pg_login_start.h"
+#include "pg_authorize_start.h"
 #include "pg_challenge_set_address_and_pin.h"
 #include "pg_validate_solve_pin.h"
 #include "pg_validation_get.h"
@@ -393,8 +393,8 @@ libchallenger_plugin_db_postgres_init (void *cls)
     = &CH_PG_client_check;
   plugin->setup_nonce
     = &CH_PG_setup_nonce;
-  plugin->login_start
-    = &CH_PG_login_start;
+  plugin->authorize_start
+    = &CH_PG_authorize_start;
   plugin->challenge_set_address_and_pin
     = &CH_PG_challenge_set_address_and_pin;
   plugin->validate_solve_pin
diff --git a/src/include/challenger_database_plugin.h 
b/src/include/challenger_database_plugin.h
index 6d49106..d454933 100644
--- a/src/include/challenger_database_plugin.h
+++ b/src/include/challenger_database_plugin.h
@@ -237,14 +237,14 @@ struct CHALLENGER_DatabasePlugin
    *   #GNUNET_DB_STATUS_HARD_ERROR on failure
    */
   enum GNUNET_DB_QueryStatus
-  (*login_start)(void *cls,
-                 const struct CHALLENGER_ValidationNonceP *nonce,
-                 uint64_t client_id,
-                 const char *client_scope,
-                 const char *client_state,
-                 const char *client_redirect_url,
-                 char **last_address,
-                 uint32_t *address_attempts_left);
+  (*authorize_start)(void *cls,
+                     const struct CHALLENGER_ValidationNonceP *nonce,
+                     uint64_t client_id,
+                     const char *client_scope,
+                     const char *client_state,
+                     const char *client_redirect_url,
+                     char **last_address,
+                     uint32_t *address_attempts_left);
 
 
   /**

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]