#include "platform.h"
#include "gnunet_json_lib.h"
#include "microhttpd.h"
#include <inttypes.h>
#include <jansson.h>
#include "gnunet_gns_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_reclaim_lib.h"
#include "gnunet_reclaim_service.h"
#include "gnunet_rest_lib.h"
#include "gnunet_rest_plugin.h"
#include "gnunet_signatures.h"
#include "json_reclaim.h"
#include "reclaim_plugin.h"
Go to the source code of this file.
Data Structures | |
struct | Plugin |
Handle for a plugin. More... | |
struct | EgoEntry |
The default namestore ego. More... | |
struct | RequestHandle |
The request handle. More... | |
Macros | |
#define | GNUNET_REST_API_NS_RECLAIM "/reclaim" |
REST root namespace. More... | |
#define | GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/reclaim/attributes" |
Attribute namespace. More... | |
#define | GNUNET_REST_API_NS_RECLAIM_CREDENTIAL "/reclaim/credential" |
Credential namespace. More... | |
#define | GNUNET_REST_API_NS_IDENTITY_TICKETS "/reclaim/tickets" |
Ticket namespace. More... | |
#define | GNUNET_REST_API_NS_IDENTITY_REVOKE "/reclaim/revoke" |
Revoke namespace. More... | |
#define | GNUNET_REST_API_NS_IDENTITY_CONSUME "/reclaim/consume" |
Revoke namespace. More... | |
#define | ID_REST_STATE_INIT 0 |
State while collecting all egos. More... | |
#define | ID_REST_STATE_POST_INIT 1 |
Done collecting egos. More... | |
Functions | |
static void | cleanup_handle (void *cls) |
Cleanup lookup handle. More... | |
static void | do_error (void *cls) |
Task run on error, sends error message. More... | |
static void | do_timeout (void *cls) |
Task run on timeout, sends error message. More... | |
static void | collect_error_cb (void *cls) |
static void | finished_cont (void *cls, int32_t success, const char *emsg) |
static void | delete_finished_cb (void *cls, int32_t success, const char *emsg) |
static void | return_response (void *cls) |
Return attributes for identity. More... | |
static void | collect_finished_cb (void *cls) |
static void | ticket_collect (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri) |
Collect all attributes for an ego. More... | |
static void | add_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
static void | cred_collect (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Credential *cred) |
Collect all credentials for an ego. More... | |
static void | list_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
Lists credential for identity request. More... | |
static void | delete_credential_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
Deletes credential from an identity. More... | |
static void | list_tickets_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
List tickets for identity request. More... | |
static void | add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
static void | attr_collect (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr) |
Parse a JWT and return the respective claim value as Attribute. More... | |
static void | list_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
List attributes for identity request. More... | |
static void | delete_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
List attributes for identity request. More... | |
static void | revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
static void | consume_cont (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr, const struct GNUNET_RECLAIM_Presentation *presentation) |
static void | consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
static void | options_cont (struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls) |
Respond to OPTIONS request. More... | |
static void | list_ego (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *identifier) |
If listing is enabled, prints information about the egos. More... | |
enum GNUNET_GenericReturnValue | REST_reclaim_process_request (void *plugin, struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls) |
Function processing the REST call. More... | |
void * | REST_reclaim_init (const struct GNUNET_CONFIGURATION_Handle *c) |
Entry point for the plugin. More... | |
void | REST_reclaim_done (struct GNUNET_REST_Plugin *api) |
Exit point from the plugin. More... | |
Variables | |
const struct GNUNET_CONFIGURATION_Handle * | rcfg |
The configuration handle. More... | |
static char * | allow_methods |
HTTP methods allows for this plugin. More... | |
static struct EgoEntry * | ego_head |
Ego list. More... | |
static struct EgoEntry * | ego_tail |
Ego list. More... | |
static int | state |
The processing state. More... | |
static struct GNUNET_IDENTITY_Handle * | identity_handle |
Handle to Identity service. More... | |
static struct GNUNET_RECLAIM_Handle * | idp |
Identity Provider. More... | |
static struct RequestHandle * | requests_head |
DLL. More... | |
static struct RequestHandle * | requests_tail |
DLL. More... | |
#define GNUNET_REST_API_NS_RECLAIM "/reclaim" |
REST root namespace.
Definition at line 46 of file reclaim_plugin.c.
#define GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/reclaim/attributes" |
Attribute namespace.
Definition at line 51 of file reclaim_plugin.c.
#define GNUNET_REST_API_NS_RECLAIM_CREDENTIAL "/reclaim/credential" |
Credential namespace.
Definition at line 56 of file reclaim_plugin.c.
#define GNUNET_REST_API_NS_IDENTITY_TICKETS "/reclaim/tickets" |
Ticket namespace.
Definition at line 61 of file reclaim_plugin.c.
#define GNUNET_REST_API_NS_IDENTITY_REVOKE "/reclaim/revoke" |
Revoke namespace.
Definition at line 66 of file reclaim_plugin.c.
#define GNUNET_REST_API_NS_IDENTITY_CONSUME "/reclaim/consume" |
Revoke namespace.
Definition at line 71 of file reclaim_plugin.c.
#define ID_REST_STATE_INIT 0 |
State while collecting all egos.
Definition at line 76 of file reclaim_plugin.c.
#define ID_REST_STATE_POST_INIT 1 |
Done collecting egos.
Definition at line 81 of file reclaim_plugin.c.
|
static |
Cleanup lookup handle.
handle | Handle to clean up |
Definition at line 277 of file reclaim_plugin.c.
References GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_RECLAIM_attribute_list_destroy(), GNUNET_RECLAIM_get_attributes_stop(), GNUNET_RECLAIM_get_credentials_stop(), GNUNET_RECLAIM_ticket_iteration_stop(), GNUNET_SCHEDULER_cancel(), handle, requests_head, and requests_tail.
Referenced by delete_finished_cb(), do_error(), finished_cont(), options_cont(), REST_reclaim_process_request(), and return_response().
|
static |
Task run on error, sends error message.
Cleans up everything.
cls | the struct RequestHandle |
Definition at line 311 of file reclaim_plugin.c.
References cleanup_handle(), GNUNET_asprintf(), GNUNET_assert, GNUNET_free, GNUNET_REST_create_response(), and handle.
Referenced by add_attribute_cont(), add_credential_cont(), collect_error_cb(), consume_ticket_cont(), delete_attribute_cont(), delete_credential_cont(), delete_finished_cb(), do_timeout(), finished_cont(), list_attribute_cont(), list_credential_cont(), list_tickets_cont(), REST_reclaim_done(), and revoke_ticket_cont().
|
static |
Task run on timeout, sends error message.
Cleans up everything.
cls | the struct RequestHandle |
Definition at line 337 of file reclaim_plugin.c.
References do_error(), and handle.
Referenced by REST_reclaim_process_request().
|
static |
Definition at line 347 of file reclaim_plugin.c.
References do_error(), and GNUNET_SCHEDULER_add_now().
Referenced by list_attribute_cont(), list_credential_cont(), and list_tickets_cont().
|
static |
Definition at line 354 of file reclaim_plugin.c.
References allow_methods, cleanup_handle(), do_error(), GNUNET_assert, GNUNET_OK, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), and handle.
Referenced by add_attribute_cont(), add_credential_cont(), and revoke_ticket_cont().
|
static |
Definition at line 378 of file reclaim_plugin.c.
References allow_methods, cleanup_handle(), do_error(), GNUNET_assert, GNUNET_OK, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), and handle.
Referenced by delete_attribute_cont(), and delete_credential_cont().
|
static |
Return attributes for identity.
cls | the request handle |
Definition at line 403 of file reclaim_plugin.c.
References allow_methods, cleanup_handle(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_REST_create_response(), and handle.
Referenced by collect_finished_cb(), consume_cont(), delete_attribute_cont(), delete_credential_cont(), list_attribute_cont(), list_credential_cont(), and list_tickets_cont().
|
static |
Definition at line 423 of file reclaim_plugin.c.
References GNUNET_SCHEDULER_add_now(), handle, and return_response().
Referenced by list_attribute_cont(), list_credential_cont(), and list_tickets_cont().
|
static |
Collect all attributes for an ego.
Definition at line 440 of file reclaim_plugin.c.
References GNUNET_RECLAIM_Ticket::gns_name, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_RECLAIM_ticket_iteration_next(), handle, and ticket.
Referenced by list_tickets_cont().
|
static |
New ID for attribute
Definition at line 458 of file reclaim_plugin.c.
References do_error(), EgoEntry::ego, ego_head, finished_cont(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_JSON_parse(), GNUNET_JSON_parse_free(), GNUNET_JSON_spec_end(), GNUNET_log, GNUNET_memcpy, GNUNET_OK, GNUNET_RECLAIM_credential_store(), GNUNET_RECLAIM_id_generate, GNUNET_RECLAIM_id_is_zero, GNUNET_RECLAIM_JSON_spec_credential(), GNUNET_REST_API_NS_RECLAIM_CREDENTIAL, GNUNET_SCHEDULER_add_now(), GNUNET_TIME_UNIT_HOURS, GNUNET_YES, handle, GNUNET_RECLAIM_Credential::id, EgoEntry::identifier, identity, idp, and EgoEntry::next.
Referenced by REST_reclaim_process_request().
|
static |
Collect all credentials for an ego.
Definition at line 550 of file reclaim_plugin.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_RECLAIM_AttributeListEntry::attribute, cred, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_OK, GNUNET_RECLAIM_attribute_list_destroy(), GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_credential_get_attributes(), GNUNET_RECLAIM_credential_get_expiration(), GNUNET_RECLAIM_credential_get_issuer(), GNUNET_RECLAIM_credential_number_to_typename(), GNUNET_RECLAIM_credential_value_to_string(), GNUNET_RECLAIM_get_credentials_next(), GNUNET_STRINGS_data_to_string_alloc(), handle, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_AttributeListEntry::next, type, and GNUNET_RECLAIM_Attribute::type.
Referenced by list_credential_cont().
|
static |
Lists credential for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 633 of file reclaim_plugin.c.
References collect_error_cb(), collect_finished_cb(), cred_collect(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_log, GNUNET_RECLAIM_get_credentials_start(), GNUNET_REST_API_NS_RECLAIM_CREDENTIAL, GNUNET_SCHEDULER_add_now(), handle, EgoEntry::identifier, identity, idp, EgoEntry::next, and return_response().
Referenced by REST_reclaim_process_request().
|
static |
Deletes credential from an identity.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 690 of file reclaim_plugin.c.
References delete_finished_cb(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_log, GNUNET_RECLAIM_credential_delete(), GNUNET_REST_API_NS_RECLAIM_CREDENTIAL, GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_string_to_data(), handle, id, GNUNET_RECLAIM_Credential::id, EgoEntry::identifier, identity, idp, GNUNET_RECLAIM_Credential::name, EgoEntry::next, and return_response().
Referenced by REST_reclaim_process_request().
|
static |
List tickets for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 757 of file reclaim_plugin.c.
References collect_error_cb(), collect_finished_cb(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_log, GNUNET_RECLAIM_ticket_iteration_start(), GNUNET_REST_API_NS_IDENTITY_TICKETS, GNUNET_SCHEDULER_add_now(), handle, EgoEntry::identifier, identity, idp, EgoEntry::next, return_response(), and ticket_collect().
Referenced by REST_reclaim_process_request().
|
static |
New ID for attribute
Definition at line 804 of file reclaim_plugin.c.
References do_error(), EgoEntry::ego, ego_head, finished_cont(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_JSON_parse(), GNUNET_JSON_parse_free(), GNUNET_JSON_spec_end(), GNUNET_log, GNUNET_memcpy, GNUNET_OK, GNUNET_RECLAIM_attribute_store(), GNUNET_RECLAIM_id_generate, GNUNET_RECLAIM_id_is_zero, GNUNET_RECLAIM_JSON_spec_attribute(), GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, GNUNET_SCHEDULER_add_now(), GNUNET_TIME_UNIT_HOURS, GNUNET_YES, handle, GNUNET_RECLAIM_Attribute::id, EgoEntry::identifier, identity, idp, and EgoEntry::next.
Referenced by REST_reclaim_process_request().
|
static |
Parse a JWT and return the respective claim value as Attribute.
cred | the jwt credential |
claim | the name of the claim in the JWT |
Definition at line 956 of file reclaim_plugin.c.
References GNUNET_RECLAIM_Attribute::credential, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_free, GNUNET_RECLAIM_attribute_number_to_typename(), GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_RECLAIM_get_attributes_next(), GNUNET_RECLAIM_id_is_zero, GNUNET_STRINGS_data_to_string_alloc(), handle, GNUNET_RECLAIM_Attribute::id, GNUNET_RECLAIM_Attribute::name, type, and GNUNET_RECLAIM_Attribute::type.
Referenced by list_attribute_cont().
|
static |
List attributes for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 1002 of file reclaim_plugin.c.
References attr_collect(), collect_error_cb(), collect_finished_cb(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_log, GNUNET_RECLAIM_get_attributes_start(), GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, GNUNET_SCHEDULER_add_now(), handle, EgoEntry::identifier, identity, idp, EgoEntry::next, and return_response().
Referenced by REST_reclaim_process_request().
|
static |
List attributes for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 1056 of file reclaim_plugin.c.
References delete_finished_cb(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_log, GNUNET_RECLAIM_attribute_delete(), GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_string_to_data(), handle, id, GNUNET_RECLAIM_Attribute::id, EgoEntry::identifier, identity, idp, GNUNET_RECLAIM_Attribute::name, EgoEntry::next, and return_response().
Referenced by REST_reclaim_process_request().
|
static |
Definition at line 1114 of file reclaim_plugin.c.
References do_error(), EgoEntry::ego, ego_head, finished_cont(), GNUNET_RECLAIM_Ticket::gns_name, GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_GNS_parse_ztld(), GNUNET_IDENTITY_ego_get_private_key(), GNUNET_IDENTITY_ego_get_public_key(), GNUNET_JSON_parse(), GNUNET_JSON_parse_free(), GNUNET_JSON_spec_end(), GNUNET_log, GNUNET_memcpy, GNUNET_OK, GNUNET_RECLAIM_JSON_spec_ticket(), GNUNET_RECLAIM_ticket_revoke(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, idp, EgoEntry::next, and ticket.
Referenced by REST_reclaim_process_request().
|
static |
Definition at line 1190 of file reclaim_plugin.c.
References GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_RECLAIM_attribute_value_to_string(), GNUNET_SCHEDULER_add_now(), handle, identity, GNUNET_RECLAIM_Attribute::name, return_response(), GNUNET_RECLAIM_Attribute::type, and value.
Referenced by consume_ticket_cont().
|
static |
Definition at line 1224 of file reclaim_plugin.c.
References consume_cont(), do_error(), GNUNET_ERROR_TYPE_ERROR, GNUNET_JSON_parse(), GNUNET_JSON_parse_free(), GNUNET_JSON_spec_end(), GNUNET_JSON_spec_string(), GNUNET_log, GNUNET_memcpy, GNUNET_OK, GNUNET_RECLAIM_JSON_spec_ticket(), GNUNET_RECLAIM_ticket_consume(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, idp, and ticket.
Referenced by REST_reclaim_process_request().
|
static |
Respond to OPTIONS request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 1284 of file reclaim_plugin.c.
References allow_methods, cleanup_handle(), GNUNET_assert, GNUNET_REST_create_response(), and handle.
Referenced by REST_reclaim_process_request().
|
static |
If listing is enabled, prints information about the egos.
This function is initially called for all egos and then again whenever a ego's identifier changes or if it is deleted. At the end of the initial pass over all egos, the function is once called with 'NULL' for 'ego'. That does NOT mean that the callback won't be invoked in the future or that there was an error.
When used with 'GNUNET_IDENTITY_create' or 'GNUNET_IDENTITY_get', this function is only called ONCE, and 'NULL' being passed in 'ego' does indicate an error (for example because name is taken or no default value is known). If 'ego' is non-NULL and if '*ctx' is set in those callbacks, the value WILL be passed to a subsequent call to the identity callback of 'GNUNET_IDENTITY_connect' (if that one was not NULL).
When an identity is renamed, this function is called with the (known) ego but the NEW identifier.
When an identity is deleted, this function is called with the (known) ego and "NULL" for the 'identifier'. In this case, the 'ego' is henceforth invalid (and the 'ctx' should also be cleaned up).
cls | closure |
ego | ego handle |
ctx | context for application to store data for this ego (during the lifetime of this process, initially NULL) |
identifier | identifier assigned by the user for this ego, NULL if the user just deleted the ego and it must thus no longer be used |
Definition at line 1335 of file reclaim_plugin.c.
References EgoEntry::ego, ego_head, ego_tail, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_CONTAINER_DLL_remove, GNUNET_CRYPTO_public_key_to_string(), GNUNET_free, GNUNET_IDENTITY_ego_get_public_key(), GNUNET_new, GNUNET_strdup, ID_REST_STATE_INIT, ID_REST_STATE_POST_INIT, EgoEntry::identifier, EgoEntry::keystring, EgoEntry::next, pk, and state.
Referenced by REST_reclaim_init().
enum GNUNET_GenericReturnValue REST_reclaim_process_request | ( | void * | plugin, |
struct GNUNET_REST_RequestHandle * | conndata_handle, | ||
GNUNET_REST_ResultProcessor | proc, | ||
void * | proc_cls | ||
) |
Function processing the REST call.
method | HTTP method |
url | URL of the HTTP request |
data | body of the HTTP request (optional) |
data_size | length of the body |
proc | callback function for the result |
proc_cls | closure for proc |
Definition at line 1411 of file reclaim_plugin.c.
References add_attribute_cont(), add_credential_cont(), cleanup_handle(), consume_ticket_cont(), delete_attribute_cont(), delete_credential_cont(), do_timeout(), GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_NO, GNUNET_REST_API_NS_IDENTITY_CONSUME, GNUNET_REST_API_NS_IDENTITY_REVOKE, GNUNET_REST_API_NS_IDENTITY_TICKETS, GNUNET_REST_API_NS_RECLAIM, GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES, GNUNET_REST_API_NS_RECLAIM_CREDENTIAL, GNUNET_REST_handle_request(), GNUNET_REST_HANDLER_END, GNUNET_SCHEDULER_add_delayed(), GNUNET_strdup, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, handle, handlers, list_attribute_cont(), list_credential_cont(), list_tickets_cont(), options_cont(), GNUNET_REST_RequestHandler::proc, requests_head, requests_tail, revoke_ticket_cont(), and GNUNET_REST_RequestHandle::url.
Referenced by run().
void * REST_reclaim_init | ( | const struct GNUNET_CONFIGURATION_Handle * | c | ) |
Entry point for the plugin.
cls | Config info |
Definition at line 1472 of file reclaim_plugin.c.
References _, allow_methods, GNUNET_REST_Plugin::cls, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_IDENTITY_connect(), GNUNET_log, GNUNET_new, GNUNET_RECLAIM_connect(), GNUNET_REST_API_NS_RECLAIM, ID_REST_STATE_INIT, identity_handle, idp, list_ego(), GNUNET_REST_Plugin::name, plugin, rcfg, and state.
Referenced by run().
void REST_reclaim_done | ( | struct GNUNET_REST_Plugin * | api | ) |
Exit point from the plugin.
cls | the plugin context (as returned by "init") |
Definition at line 1508 of file reclaim_plugin.c.
References allow_methods, Plugin::api, GNUNET_BLOCK_PluginFunctions::cls, do_error(), ego_head, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_IDENTITY_disconnect(), GNUNET_log, GNUNET_RECLAIM_disconnect(), EgoEntry::identifier, identity_handle, idp, EgoEntry::keystring, EgoEntry::next, plugin, request, and requests_head.
Referenced by do_shutdown().
const struct GNUNET_CONFIGURATION_Handle* rcfg |
The configuration handle.
Definition at line 86 of file reclaim_plugin.c.
Referenced by REST_reclaim_init().
|
static |
HTTP methods allows for this plugin.
Definition at line 91 of file reclaim_plugin.c.
Referenced by delete_finished_cb(), finished_cont(), options_cont(), REST_reclaim_done(), REST_reclaim_init(), and return_response().
|
static |
Ego list.
Definition at line 96 of file reclaim_plugin.c.
Referenced by add_attribute_cont(), add_credential_cont(), delete_attribute_cont(), delete_credential_cont(), list_attribute_cont(), list_credential_cont(), list_ego(), list_tickets_cont(), REST_reclaim_done(), and revoke_ticket_cont().
|
static |
|
static |
The processing state.
Definition at line 106 of file reclaim_plugin.c.
Referenced by list_ego(), and REST_reclaim_init().
|
static |
Handle to Identity service.
Definition at line 111 of file reclaim_plugin.c.
Referenced by REST_reclaim_done(), and REST_reclaim_init().
|
static |
Identity Provider.
Definition at line 116 of file reclaim_plugin.c.
Referenced by add_attribute_cont(), add_credential_cont(), consume_ticket_cont(), delete_attribute_cont(), delete_credential_cont(), list_attribute_cont(), list_credential_cont(), list_tickets_cont(), REST_reclaim_done(), REST_reclaim_init(), and revoke_ticket_cont().
|
static |
DLL.
Definition at line 264 of file reclaim_plugin.c.
Referenced by cleanup_handle(), REST_reclaim_done(), and REST_reclaim_process_request().
|
static |
DLL.
Definition at line 269 of file reclaim_plugin.c.
Referenced by cleanup_handle(), and REST_reclaim_process_request().