GNUnet reclaim REST plugin. More...
#include "platform.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"
Go to the source code of this file.
Data Structures | |
struct | Plugin |
Handle for a plugin. More... | |
struct | EgoEntry |
The ego list. 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) |
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_IDENTITY_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) |
struct GNUNET_RECLAIM_Attribute * | parse_jwt (const struct GNUNET_RECLAIM_Credential *cred, const char *claim) |
Parse a JWT and return the respective claim value as Attribute. More... | |
static void | attr_collect (void *cls, const struct GNUNET_IDENTITY_PublicKey *identity, const struct GNUNET_RECLAIM_Attribute *attr) |
Collect all attributes for an ego. 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_IDENTITY_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... | |
static enum GNUNET_GenericReturnValue | rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls) |
void * | libgnunet_plugin_rest_reclaim_init (void *cls) |
Entry point for the plugin. More... | |
void * | libgnunet_plugin_rest_reclaim_done (void *cls) |
Exit point from the plugin. More... | |
Variables | |
const struct GNUNET_CONFIGURATION_Handle * | cfg |
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... | |
GNUnet reclaim REST plugin.
Definition in file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_RECLAIM "/reclaim" |
REST root namespace.
Definition at line 43 of file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_RECLAIM_ATTRIBUTES "/reclaim/attributes" |
Attribute namespace.
Definition at line 48 of file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_RECLAIM_CREDENTIAL "/reclaim/credential" |
Credential namespace.
Definition at line 53 of file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_IDENTITY_TICKETS "/reclaim/tickets" |
Ticket namespace.
Definition at line 58 of file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_IDENTITY_REVOKE "/reclaim/revoke" |
Revoke namespace.
Definition at line 63 of file plugin_rest_reclaim.c.
#define GNUNET_REST_API_NS_IDENTITY_CONSUME "/reclaim/consume" |
Revoke namespace.
Definition at line 68 of file plugin_rest_reclaim.c.
#define ID_REST_STATE_INIT 0 |
State while collecting all egos.
Definition at line 73 of file plugin_rest_reclaim.c.
#define ID_REST_STATE_POST_INIT 1 |
Done collecting egos.
Definition at line 78 of file plugin_rest_reclaim.c.
|
static |
Cleanup lookup handle.
handle | Handle to clean up |
Definition at line 274 of file plugin_rest_reclaim.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(), and return_response().
|
static |
Task run on error, sends error message.
Cleans up everything.
cls | the struct RequestHandle |
Definition at line 308 of file plugin_rest_reclaim.c.
References cleanup_handle(), GNUNET_asprintf(), GNUNET_assert, GNUNET_free, GNUNET_REST_create_response(), handle, and MHD_HTTP_BAD_REQUEST.
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(), libgnunet_plugin_rest_reclaim_done(), list_attribute_cont(), list_credential_cont(), list_tickets_cont(), and revoke_ticket_cont().
|
static |
Task run on timeout, sends error message.
Cleans up everything.
cls | the struct RequestHandle |
Definition at line 333 of file plugin_rest_reclaim.c.
References do_error(), and handle.
|
static |
Definition at line 343 of file plugin_rest_reclaim.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 350 of file plugin_rest_reclaim.c.
References allow_methods, cleanup_handle(), do_error(), GNUNET_assert, GNUNET_OK, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), handle, and MHD_HTTP_OK.
Referenced by add_attribute_cont(), add_credential_cont(), and revoke_ticket_cont().
|
static |
Definition at line 374 of file plugin_rest_reclaim.c.
References allow_methods, cleanup_handle(), do_error(), GNUNET_assert, GNUNET_OK, GNUNET_REST_create_response(), GNUNET_SCHEDULER_add_now(), handle, and MHD_HTTP_OK.
Referenced by delete_attribute_cont(), and delete_credential_cont().
|
static |
Return attributes for identity.
cls | the request handle |
Definition at line 399 of file plugin_rest_reclaim.c.
References allow_methods, cleanup_handle(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_REST_create_response(), handle, and MHD_HTTP_OK.
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 419 of file plugin_rest_reclaim.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 436 of file plugin_rest_reclaim.c.
References GNUNET_RECLAIM_Ticket::audience, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_RECLAIM_ticket_iteration_next(), GNUNET_STRINGS_data_to_string_alloc(), handle, GNUNET_RECLAIM_Ticket::identity, GNUNET_RECLAIM_Ticket::rnd, ticket, and value.
Referenced by list_tickets_cont().
|
static |
New ID for attribute
Definition at line 472 of file plugin_rest_reclaim.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.
|
static |
Collect all credentials for an ego.
Definition at line 564 of file plugin_rest_reclaim.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_RECLAIM_AttributeListEntry::attribute, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Credential::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_RECLAIM_Credential::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_Credential::id, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_Credential::name, GNUNET_RECLAIM_AttributeListEntry::next, GNUNET_RECLAIM_Attribute::type, GNUNET_RECLAIM_Credential::type, and 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 647 of file plugin_rest_reclaim.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().
|
static |
Deletes credential from an identity.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 704 of file plugin_rest_reclaim.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().
|
static |
List tickets for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 771 of file plugin_rest_reclaim.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().
|
static |
New ID for attribute
Definition at line 818 of file plugin_rest_reclaim.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.
struct GNUNET_RECLAIM_Attribute* parse_jwt | ( | const struct GNUNET_RECLAIM_Credential * | cred, |
const char * | claim | ||
) |
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 904 of file plugin_rest_reclaim.c.
References claim, GNUNET_RECLAIM_Credential::data, data, data_size, GNUNET_RECLAIM_Credential::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_attribute_string_to_value(), GNUNET_RECLAIM_attribute_typename_to_number(), GNUNET_RECLAIM_credential_value_to_string(), GNUNET_STRINGS_base64_decode(), GNUNET_SYSERR, GNUNET_RECLAIM_Attribute::id, GNUNET_RECLAIM_Credential::id, key, GNUNET_RECLAIM_Credential::type, type, type_str, and value.
|
static |
Collect all attributes for an ego.
Definition at line 969 of file plugin_rest_reclaim.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, GNUNET_RECLAIM_Attribute::type, and 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 1015 of file plugin_rest_reclaim.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().
|
static |
List attributes for identity request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 1069 of file plugin_rest_reclaim.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().
|
static |
Definition at line 1127 of file plugin_rest_reclaim.c.
References do_error(), EgoEntry::ego, ego_head, finished_cont(), GNUNET_ERROR_TYPE_ERROR, 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, GNUNET_RECLAIM_Ticket::identity, idp, EgoEntry::next, and ticket.
|
static |
Definition at line 1200 of file plugin_rest_reclaim.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 1234 of file plugin_rest_reclaim.c.
References GNUNET_RECLAIM_Ticket::audience, consume_cont(), do_error(), EgoEntry::ego, ego_head, GNUNET_ERROR_TYPE_ERROR, 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_consume(), GNUNET_SCHEDULER_add_now(), GNUNET_strdup, handle, idp, EgoEntry::next, and ticket.
|
static |
Respond to OPTIONS request.
con_handle | the connection handle |
url | the url |
cls | the RequestHandle |
Definition at line 1310 of file plugin_rest_reclaim.c.
References allow_methods, cleanup_handle(), GNUNET_assert, GNUNET_REST_create_response(), handle, and MHD_HTTP_OK.
|
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 1359 of file plugin_rest_reclaim.c.
References EgoEntry::ego, ego_head, ego_tail, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_IDENTITY_ego_get_public_key(), GNUNET_IDENTITY_public_key_to_string(), GNUNET_new, GNUNET_strdup, ID_REST_STATE_INIT, ID_REST_STATE_POST_INIT, EgoEntry::identifier, EgoEntry::keystring, EgoEntry::next, pk, and state.
Referenced by libgnunet_plugin_rest_reclaim_init().
|
static |
Definition at line 1359 of file plugin_rest_reclaim.c.
Referenced by libgnunet_plugin_rest_reclaim_init().
void* libgnunet_plugin_rest_reclaim_init | ( | void * | cls | ) |
Entry point for the plugin.
cls | Config info |
Definition at line 1495 of file plugin_rest_reclaim.c.
References _, allow_methods, cfg, 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, GNUNET_REST_Plugin::process_request, rest_identity_process_request(), and state.
void* libgnunet_plugin_rest_reclaim_done | ( | void * | cls | ) |
Exit point from the plugin.
cls | the plugin context (as returned by "init") |
Definition at line 1532 of file plugin_rest_reclaim.c.
References allow_methods, Plugin::api, GNUNET_BLOCK_PluginFunctions::cls, GNUNET_REST_Plugin::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.
const struct GNUNET_CONFIGURATION_Handle* cfg |
The configuration handle.
Handle to our configuration.
Definition at line 83 of file plugin_rest_reclaim.c.
Referenced by libgnunet_plugin_rest_reclaim_init().
|
static |
HTTP methods allows for this plugin.
Definition at line 88 of file plugin_rest_reclaim.c.
Referenced by delete_finished_cb(), finished_cont(), libgnunet_plugin_rest_reclaim_done(), libgnunet_plugin_rest_reclaim_init(), options_cont(), and return_response().
|
static |
Ego list.
Definition at line 93 of file plugin_rest_reclaim.c.
Referenced by add_attribute_cont(), add_credential_cont(), consume_ticket_cont(), delete_attribute_cont(), delete_credential_cont(), libgnunet_plugin_rest_reclaim_done(), list_attribute_cont(), list_credential_cont(), list_ego(), list_tickets_cont(), and revoke_ticket_cont().
|
static |
|
static |
The processing state.
Definition at line 103 of file plugin_rest_reclaim.c.
Referenced by libgnunet_plugin_rest_reclaim_init(), and list_ego().
|
static |
Handle to Identity service.
Definition at line 108 of file plugin_rest_reclaim.c.
Referenced by libgnunet_plugin_rest_reclaim_done(), and libgnunet_plugin_rest_reclaim_init().
|
static |
Identity Provider.
Definition at line 113 of file plugin_rest_reclaim.c.
Referenced by add_attribute_cont(), add_credential_cont(), consume_ticket_cont(), delete_attribute_cont(), delete_credential_cont(), libgnunet_plugin_rest_reclaim_done(), libgnunet_plugin_rest_reclaim_init(), list_attribute_cont(), list_credential_cont(), list_tickets_cont(), and revoke_ticket_cont().
|
static |
DLL.
Definition at line 261 of file plugin_rest_reclaim.c.
Referenced by cleanup_handle(), and libgnunet_plugin_rest_reclaim_done().
|
static |