commit e335d3264f654ada1e588ae7d67f5fccb7b45d28
parent 206ebd255645426585bf21d005306bfc1a88430e
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 8 May 2023 21:17:33 +0200
rename grant to token
Diffstat:
14 files changed, 254 insertions(+), 254 deletions(-)
diff --git a/src/challenger/challenger-httpd_info.c b/src/challenger/challenger-httpd_info.c
@@ -84,7 +84,7 @@ CH_handler_info (struct CH_HandlerContext *hc,
struct GNUNET_TIME_Timestamp address_expiration;
MHD_RESULT mret;
- qs = CH_db->info_get_grant (CH_db->cls,
+ qs = CH_db->info_get_token (CH_db->cls,
&grant,
&address,
&address_expiration);
@@ -95,7 +95,7 @@ CH_handler_info (struct CH_HandlerContext *hc,
return TALER_MHD_reply_with_error (hc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_DB_FETCH_FAILED,
- "info_get_grant");
+ "info_get_token");
case GNUNET_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return MHD_NO;
@@ -103,7 +103,7 @@ CH_handler_info (struct CH_HandlerContext *hc,
return TALER_MHD_reply_with_error (hc->connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_CHALLENGER_GRANT_UNKNOWN,
- "info_get_grant");
+ "info_get_token");
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
break;
}
diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c
@@ -425,7 +425,7 @@ CH_handler_token (struct CH_HandlerContext *hc,
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&token,
sizeof (token));
- qs = CH_db->token_add_grant (CH_db->cls,
+ qs = CH_db->token_add_token (CH_db->cls,
&bc->nonce,
&token,
token_expiration,
@@ -438,7 +438,7 @@ CH_handler_token (struct CH_HandlerContext *hc,
hc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_DB_STORE_FAILED,
- "token_add_grant");
+ "token_add_token");
case GNUNET_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return MHD_NO;
@@ -449,7 +449,7 @@ CH_handler_token (struct CH_HandlerContext *hc,
MHD_HTTP_UNAUTHORIZED,
"invalid_grant",
TALER_EC_CHALLENGER_GRANT_UNKNOWN,
- "token_add_grant");
+ "token_add_token");
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
break;
}
diff --git a/src/challengerdb/Makefile.am b/src/challengerdb/Makefile.am
@@ -60,8 +60,8 @@ libchallenger_plugin_db_postgres_la_SOURCES = \
pg_client_add.h pg_client_add.c \
pg_client_delete.h pg_client_delete.c \
pg_client_check.h pg_client_check.c \
- pg_info_get_grant.h pg_info_get_grant.c \
- pg_token_add_grant.h pg_token_add_grant.c \
+ pg_info_get_token.h pg_info_get_token.c \
+ pg_token_add_token.h pg_token_add_token.c \
pg_setup_nonce.h pg_setup_nonce.c \
pg_authorize_start.h pg_authorize_start.c \
pg_challenge_set_address_and_pin.h pg_challenge_set_address_and_pin.c \
diff --git a/src/challengerdb/challenger-0001.sql b/src/challengerdb/challenger-0001.sql
@@ -94,23 +94,23 @@ CREATE INDEX IF NOT EXISTS validations_expiration
ON validations (expiration_time);
-CREATE TABLE IF NOT EXISTS grants
+CREATE TABLE IF NOT EXISTS tokens
(grant_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY
,access_token BYTEA PRIMARY KEY CHECK (length(access_token)=32)
,address VARCHAR NOT NULL
,address_expiration_time INT8 NOT NULL
- ,grant_expiration_time INT8 NOT NULL
+ ,token_expiration_time INT8 NOT NULL
);
-COMMENT ON TABLE grants
- IS 'Active grants where a client is authorized to access user data';
-COMMENT ON COLUMN grants.access_token
- IS 'Token that grants access to the resource (the address)';
-COMMENT ON COLUMN grants.address
+COMMENT ON TABLE tokens
+ IS 'Active tokens where a client is authorized to access user data';
+COMMENT ON COLUMN tokens.access_token
+ IS 'Token that tokens access to the resource (the address)';
+COMMENT ON COLUMN tokens.address
IS 'Address of the user (the resource protected by the token)';
-COMMENT ON COLUMN grants.address_expiration_time
+COMMENT ON COLUMN tokens.address_expiration_time
IS 'Timestamp until when we consider the address to be valid';
-COMMENT ON COLUMN grants.grant_expiration_time
+COMMENT ON COLUMN tokens.token_expiration_time
IS 'Time until when we consider the grant to be valid';
-- Complete transaction
diff --git a/src/challengerdb/pg_info_get_grant.c b/src/challengerdb/pg_info_get_grant.c
@@ -1,69 +0,0 @@
-/*
- This file is part of Challenger
- Copyright (C) 2023 Taler Systems SA
-
- Challenger is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file challengerdb/pg_info_get_grant.c
- * @brief Implementation of the info_get_grant 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_info_get_grant.h"
-#include "pg_helper.h"
-
-
-enum GNUNET_DB_QueryStatus
-CH_PG_info_get_grant (
- void *cls,
- const struct CHALLENGER_AccessTokenP *grant,
- char **address,
- struct GNUNET_TIME_Timestamp *address_expiration)
-{
- struct PostgresClosure *pg = cls;
- struct GNUNET_TIME_Absolute now
- = GNUNET_TIME_absolute_get ();
- struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_auto_from_type (grant),
- GNUNET_PQ_query_param_absolute_time (&now),
- GNUNET_PQ_query_param_end
- };
- struct GNUNET_TIME_Absolute at;
- struct GNUNET_PQ_ResultSpec rs[] = {
- GNUNET_PQ_result_spec_string ("address",
- address),
- GNUNET_PQ_result_spec_absolute_time ("address_expiration_time",
- &at),
- GNUNET_PQ_result_spec_end
- };
- enum GNUNET_DB_QueryStatus qs;
-
- PREPARE (pg,
- "info_get_grant",
- "SELECT "
- " address"
- " ,address_expiration_time"
- " FROM grants"
- " WHERE access_token=$1"
- " AND grant_expiration_time > $2");
- qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
- "info_get_grant",
- params,
- rs);
- if (qs > 0)
- *address_expiration = GNUNET_TIME_absolute_to_timestamp (at);
- return qs;
-}
diff --git a/src/challengerdb/pg_info_get_grant.h b/src/challengerdb/pg_info_get_grant.h
@@ -1,46 +0,0 @@
-/*
- This file is part of Challenger
- Copyright (C) 2023 Taler Systems SA
-
- Challenger is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file challengerdb/pg_info_get_grant.h
- * @brief implementation of the info_get_grant function for Postgres
- * @author Christian Grothoff
- */
-#ifndef PG_INFO_GET_GRANT_H
-#define PG_INFO_GET_GRANT_H
-
-#include <taler/taler_util.h>
-#include <taler/taler_json_lib.h>
-#include "challenger_database_plugin.h"
-
-
-/**
- * Return @a address which @a grant gives access to.
- *
- * @param cls closure
- * @param grant grant token that grants access
- * @param[out] address set to the address under @a grant
- * @param[out] address_expiration set to how long we consider @a address to be valid
- * @return transaction status
- */
-enum GNUNET_DB_QueryStatus
-CH_PG_info_get_grant (
- void *cls,
- const struct CHALLENGER_AccessTokenP *grant,
- char **address,
- struct GNUNET_TIME_Timestamp *address_expiration);
-
-
-#endif
diff --git a/src/challengerdb/pg_info_get_token.c b/src/challengerdb/pg_info_get_token.c
@@ -0,0 +1,69 @@
+/*
+ This file is part of Challenger
+ Copyright (C) 2023 Taler Systems SA
+
+ Challenger is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file challengerdb/pg_info_get_token.c
+ * @brief Implementation of the info_get_token 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_info_get_token.h"
+#include "pg_helper.h"
+
+
+enum GNUNET_DB_QueryStatus
+CH_PG_info_get_token (
+ void *cls,
+ const struct CHALLENGER_AccessTokenP *token,
+ char **address,
+ struct GNUNET_TIME_Timestamp *address_expiration)
+{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_TIME_Absolute now
+ = GNUNET_TIME_absolute_get ();
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_auto_from_type (token),
+ GNUNET_PQ_query_param_absolute_time (&now),
+ GNUNET_PQ_query_param_end
+ };
+ struct GNUNET_TIME_Absolute at;
+ struct GNUNET_PQ_ResultSpec rs[] = {
+ GNUNET_PQ_result_spec_string ("address",
+ address),
+ GNUNET_PQ_result_spec_absolute_time ("address_expiration_time",
+ &at),
+ GNUNET_PQ_result_spec_end
+ };
+ enum GNUNET_DB_QueryStatus qs;
+
+ PREPARE (pg,
+ "info_get_token",
+ "SELECT "
+ " address"
+ " ,address_expiration_time"
+ " FROM tokens"
+ " WHERE access_token=$1"
+ " AND token_expiration_time > $2");
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "info_get_token",
+ params,
+ rs);
+ if (qs > 0)
+ *address_expiration = GNUNET_TIME_absolute_to_timestamp (at);
+ return qs;
+}
diff --git a/src/challengerdb/pg_info_get_token.h b/src/challengerdb/pg_info_get_token.h
@@ -0,0 +1,46 @@
+/*
+ This file is part of Challenger
+ Copyright (C) 2023 Taler Systems SA
+
+ Challenger is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file challengerdb/pg_info_get_token.h
+ * @brief implementation of the info_get_token function for Postgres
+ * @author Christian Grothoff
+ */
+#ifndef PG_INFO_GET_GRANT_H
+#define PG_INFO_GET_GRANT_H
+
+#include <taler/taler_util.h>
+#include <taler/taler_json_lib.h>
+#include "challenger_database_plugin.h"
+
+
+/**
+ * Return @a address which @a grant gives access to.
+ *
+ * @param cls closure
+ * @param grant grant token that grants access
+ * @param[out] address set to the address under @a grant
+ * @param[out] address_expiration set to how long we consider @a address to be valid
+ * @return transaction status
+ */
+enum GNUNET_DB_QueryStatus
+CH_PG_info_get_token (
+ void *cls,
+ const struct CHALLENGER_AccessTokenP *grant,
+ char **address,
+ struct GNUNET_TIME_Timestamp *address_expiration);
+
+
+#endif
diff --git a/src/challengerdb/pg_token_add_grant.c b/src/challengerdb/pg_token_add_grant.c
@@ -1,62 +0,0 @@
-/*
- This file is part of Challenger
- Copyright (C) 2023 Taler Systems SA
-
- Challenger is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file challengerdb/pg_token_add_grant.c
- * @brief Implementation of the token_add_grant 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_token_add_grant.h"
-#include "pg_helper.h"
-
-
-enum GNUNET_DB_QueryStatus
-CH_PG_token_add_grant (
- void *cls,
- const struct CHALLENGER_ValidationNonceP *nonce,
- const struct CHALLENGER_AccessTokenP *grant,
- struct GNUNET_TIME_Relative grant_expiration,
- struct GNUNET_TIME_Relative address_expiration)
-{
- struct PostgresClosure *pg = cls;
- struct GNUNET_TIME_Absolute ge
- = GNUNET_TIME_relative_to_absolute (grant_expiration);
- struct GNUNET_PQ_QueryParam params[] = {
- GNUNET_PQ_query_param_auto_from_type (nonce),
- GNUNET_PQ_query_param_auto_from_type (grant),
- GNUNET_PQ_query_param_absolute_time (&ge),
- GNUNET_PQ_query_param_relative_time (&address_expiration),
- GNUNET_PQ_query_param_end
- };
-
- PREPARE (pg,
- "token_add_grant",
- "INSERT INTO grants"
- " (access_token"
- " ,address"
- " ,grant_expiration_time"
- " ,address_expiration_time"
- ") SELECT"
- " $2, address, $3, $4 + last_tx_time"
- " FROM validations"
- " WHERE nonce=$1;");
- return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "token_add_grant",
- params);
-}
diff --git a/src/challengerdb/pg_token_add_grant.h b/src/challengerdb/pg_token_add_grant.h
@@ -1,48 +0,0 @@
-/*
- This file is part of Challenger
- Copyright (C) 2023 Taler Systems SA
-
- Challenger is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-/**
- * @file challengerdb/pg_token_add_grant.h
- * @brief implementation of the token_add_grant function for Postgres
- * @author Christian Grothoff
- */
-#ifndef PG_AUTH_ADD_GRANT_H
-#define PG_AUTH_ADD_GRANT_H
-
-#include <taler/taler_util.h>
-#include <taler/taler_json_lib.h>
-#include "challenger_database_plugin.h"
-
-
-/**
- * Add access @a grant to address under @a nonce.
- *
- * @param cls closure
- * @param nonce validation process to grant access to
- * @param grant grant token that grants access
- * @param grant_expiration for how long should the grant be valid
- * @param address_expiration for how long after validation do we consider addresses to be valid
- * @return transaction status
- */
-enum GNUNET_DB_QueryStatus
-CH_PG_token_add_grant (
- void *cls,
- const struct CHALLENGER_ValidationNonceP *nonce,
- const struct CHALLENGER_AccessTokenP *grant,
- struct GNUNET_TIME_Relative grant_expiration,
- struct GNUNET_TIME_Relative address_expiration);
-
-
-#endif
diff --git a/src/challengerdb/pg_token_add_token.c b/src/challengerdb/pg_token_add_token.c
@@ -0,0 +1,62 @@
+/*
+ This file is part of Challenger
+ Copyright (C) 2023 Taler Systems SA
+
+ Challenger is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file challengerdb/pg_token_add_token.c
+ * @brief Implementation of the token_add_token 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_token_add_token.h"
+#include "pg_helper.h"
+
+
+enum GNUNET_DB_QueryStatus
+CH_PG_token_add_token (
+ void *cls,
+ const struct CHALLENGER_ValidationNonceP *nonce,
+ const struct CHALLENGER_AccessTokenP *token,
+ struct GNUNET_TIME_Relative token_expiration,
+ struct GNUNET_TIME_Relative address_expiration)
+{
+ struct PostgresClosure *pg = cls;
+ struct GNUNET_TIME_Absolute ge
+ = GNUNET_TIME_relative_to_absolute (token_expiration);
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_auto_from_type (nonce),
+ GNUNET_PQ_query_param_auto_from_type (token),
+ GNUNET_PQ_query_param_absolute_time (&ge),
+ GNUNET_PQ_query_param_relative_time (&address_expiration),
+ GNUNET_PQ_query_param_end
+ };
+
+ PREPARE (pg,
+ "token_add_token",
+ "INSERT INTO tokens"
+ " (access_token"
+ " ,address"
+ " ,token_expiration_time"
+ " ,address_expiration_time"
+ ") SELECT"
+ " $2, address, $3, $4 + last_tx_time"
+ " FROM validations"
+ " WHERE nonce=$1;");
+ return GNUNET_PQ_eval_prepared_non_select (pg->conn,
+ "token_add_token",
+ params);
+}
diff --git a/src/challengerdb/pg_token_add_token.h b/src/challengerdb/pg_token_add_token.h
@@ -0,0 +1,48 @@
+/*
+ This file is part of Challenger
+ Copyright (C) 2023 Taler Systems SA
+
+ Challenger is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ Challenger is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ Challenger; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+/**
+ * @file challengerdb/pg_token_add_token.h
+ * @brief implementation of the token_add_token function for Postgres
+ * @author Christian Grothoff
+ */
+#ifndef PG_AUTH_ADD_GRANT_H
+#define PG_AUTH_ADD_GRANT_H
+
+#include <taler/taler_util.h>
+#include <taler/taler_json_lib.h>
+#include "challenger_database_plugin.h"
+
+
+/**
+ * Add access @a grant to address under @a nonce.
+ *
+ * @param cls closure
+ * @param nonce validation process to grant access to
+ * @param grant grant token that grants access
+ * @param grant_expiration for how long should the grant be valid
+ * @param address_expiration for how long after validation do we consider addresses to be valid
+ * @return transaction status
+ */
+enum GNUNET_DB_QueryStatus
+CH_PG_token_add_token (
+ void *cls,
+ const struct CHALLENGER_ValidationNonceP *nonce,
+ const struct CHALLENGER_AccessTokenP *grant,
+ struct GNUNET_TIME_Relative grant_expiration,
+ struct GNUNET_TIME_Relative address_expiration);
+
+
+#endif
diff --git a/src/challengerdb/plugin_challengerdb_postgres.c b/src/challengerdb/plugin_challengerdb_postgres.c
@@ -28,8 +28,8 @@
#include "pg_helper.h"
#include "pg_client_add.h"
#include "pg_client_delete.h"
-#include "pg_info_get_grant.h"
-#include "pg_token_add_grant.h"
+#include "pg_info_get_token.h"
+#include "pg_token_add_token.h"
#include "pg_client_check.h"
#include "pg_setup_nonce.h"
#include "pg_authorize_start.h"
@@ -292,9 +292,9 @@ postgres_gc (void *cls,
"DELETE FROM validations"
" WHERE expiration_time < $1;");
PREPARE (pg,
- "gc_grants",
- "DELETE FROM grants"
- " WHERE grant_expiration_time < $1;");
+ "gc_tokens",
+ "DELETE FROM tokens"
+ " WHERE token_expiration_time < $1;");
postgres_preflight (pg);
qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
"gc_validations",
@@ -302,7 +302,7 @@ postgres_gc (void *cls,
if (qs < 0)
return qs;
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "gc_grants",
+ "gc_tokens",
params);
}
@@ -401,10 +401,10 @@ libchallenger_plugin_db_postgres_init (void *cls)
= &CH_PG_validate_solve_pin;
plugin->validation_get
= &CH_PG_validation_get;
- plugin->info_get_grant
- = &CH_PG_info_get_grant;
- plugin->token_add_grant
- = &CH_PG_token_add_grant;
+ plugin->info_get_token
+ = &CH_PG_info_get_token;
+ plugin->token_add_token
+ = &CH_PG_token_add_token;
return plugin;
}
diff --git a/src/include/challenger_database_plugin.h b/src/include/challenger_database_plugin.h
@@ -335,7 +335,7 @@ struct CHALLENGER_DatabasePlugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*token_add_grant)(void *cls,
+ (*token_add_token)(void *cls,
const struct CHALLENGER_ValidationNonceP *nonce,
const struct CHALLENGER_AccessTokenP *grant,
struct GNUNET_TIME_Relative grant_expiration,
@@ -352,7 +352,7 @@ struct CHALLENGER_DatabasePlugin
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
- (*info_get_grant)(void *cls,
+ (*info_get_token)(void *cls,
const struct CHALLENGER_AccessTokenP *grant,
char **address,
struct GNUNET_TIME_Timestamp *address_expiration);