aboutsummaryrefslogtreecommitdiff
path: root/src/identity-provider/plugin_rest_identity_provider.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2017-12-02 22:32:28 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2017-12-02 22:32:28 +0100
commita9a7ac802811e76e33b54040bf31f00ea9438cea (patch)
tree7f9a22daca2b95e7308d8877c668fc878a39ae4c /src/identity-provider/plugin_rest_identity_provider.c
parent14c62ed969ace8843154d10b55d4c3571383dc37 (diff)
downloadgnunet-a9a7ac802811e76e33b54040bf31f00ea9438cea.tar.gz
gnunet-a9a7ac802811e76e33b54040bf31f00ea9438cea.zip
-refactored
Diffstat (limited to 'src/identity-provider/plugin_rest_identity_provider.c')
-rw-r--r--src/identity-provider/plugin_rest_identity_provider.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c
index f6039722f..c27662a0d 100644
--- a/src/identity-provider/plugin_rest_identity_provider.c
+++ b/src/identity-provider/plugin_rest_identity_provider.c
@@ -37,6 +37,7 @@
37#include <jansson.h> 37#include <jansson.h>
38#include <inttypes.h> 38#include <inttypes.h>
39#include "gnunet_signatures.h" 39#include "gnunet_signatures.h"
40#include "gnunet_identity_attribute_lib.h"
40#include "gnunet_identity_provider_service.h" 41#include "gnunet_identity_provider_service.h"
41 42
42/** 43/**
@@ -508,7 +509,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle,
508 struct RequestHandle *handle = cls; 509 struct RequestHandle *handle = cls;
509 struct EgoEntry *ego_entry; 510 struct EgoEntry *ego_entry;
510 struct MHD_Response *resp; 511 struct MHD_Response *resp;
511 struct GNUNET_IDENTITY_PROVIDER_Attribute *attribute; 512 struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attribute;
512 struct GNUNET_JSONAPI_Document *json_obj; 513 struct GNUNET_JSONAPI_Document *json_obj;
513 struct GNUNET_JSONAPI_Resource *json_res; 514 struct GNUNET_JSONAPI_Resource *json_res;
514 char term_data[handle->rest_handle->data_size+1]; 515 char term_data[handle->rest_handle->data_size+1];
@@ -596,8 +597,8 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle,
596 value_json = GNUNET_JSONAPI_resource_read_attr (json_res, 597 value_json = GNUNET_JSONAPI_resource_read_attr (json_res,
597 "value"); 598 "value");
598 value_str = json_string_value (value_json); 599 value_str = json_string_value (value_json);
599 attribute = GNUNET_IDENTITY_PROVIDER_attribute_new (name_str, 600 attribute = GNUNET_IDENTITY_ATTRIBUTE_claim_new (name_str,
600 GNUNET_IDENTITY_PROVIDER_AT_STRING, 601 GNUNET_IDENTITY_ATTRIBUTE_TYPE_STRING,
601 value_str, 602 value_str,
602 strlen (value_str) + 1); 603 strlen (value_str) + 1);
603 handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); 604 handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg);
@@ -619,7 +620,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle,
619static void 620static void
620attr_collect (void *cls, 621attr_collect (void *cls,
621 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 622 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
622 const struct GNUNET_IDENTITY_PROVIDER_Attribute *attr) 623 const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr)
623{ 624{
624 struct GNUNET_JSONAPI_Resource *json_resource; 625 struct GNUNET_JSONAPI_Resource *json_resource;
625 struct RequestHandle *handle = cls; 626 struct RequestHandle *handle = cls;
@@ -833,7 +834,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle,
833static void 834static void
834consume_cont (void *cls, 835consume_cont (void *cls,
835 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 836 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
836 const struct GNUNET_IDENTITY_PROVIDER_Attribute *attr) 837 const struct GNUNET_IDENTITY_ATTRIBUTE_Claim *attr)
837{ 838{
838 struct RequestHandle *handle = cls; 839 struct RequestHandle *handle = cls;
839 struct GNUNET_JSONAPI_Resource *json_resource; 840 struct GNUNET_JSONAPI_Resource *json_resource;