diff options
Diffstat (limited to 'src/include/gnunet_identity_provider_service.h')
-rw-r--r-- | src/include/gnunet_identity_provider_service.h | 99 |
1 files changed, 63 insertions, 36 deletions
diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_identity_provider_service.h index 02cd15959..198e2f918 100644 --- a/src/include/gnunet_identity_provider_service.h +++ b/src/include/gnunet_identity_provider_service.h | |||
@@ -343,20 +343,6 @@ typedef void | |||
343 | const struct GNUNET_IDENTITY_PROVIDER_Ticket2 *ticket); | 343 | const struct GNUNET_IDENTITY_PROVIDER_Ticket2 *ticket); |
344 | 344 | ||
345 | /** | 345 | /** |
346 | * Method called when issued tickets are retrieved. Also returns the attributes | ||
347 | * that were issued at the time. | ||
348 | * | ||
349 | * @param cls closure | ||
350 | * @param ticket the ticket | ||
351 | * @param attrs the attributes as list | ||
352 | */ | ||
353 | typedef void | ||
354 | (*GNUNET_IDENTITY_PROVIDER_TicketResult)(void *cls, | ||
355 | const struct GNUNET_IDENTITY_PROVIDER_Ticket2 *ticket, | ||
356 | const struct GNUNET_IDENTITY_PROVIDER_AttributeList *attrs); | ||
357 | |||
358 | |||
359 | /** | ||
360 | * Issues a ticket to another identity. The identity may use | 346 | * Issues a ticket to another identity. The identity may use |
361 | * @GNUNET_IDENTITY_PROVIDER_authorization_ticket_consume to consume the ticket | 347 | * @GNUNET_IDENTITY_PROVIDER_authorization_ticket_consume to consume the ticket |
362 | * and retrieve the attributes specified in the AttributeList. | 348 | * and retrieve the attributes specified in the AttributeList. |
@@ -415,37 +401,78 @@ GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Hand | |||
415 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, | 401 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, |
416 | void *cb_cls); | 402 | void *cb_cls); |
417 | 403 | ||
418 | /** TODO | 404 | /** |
405 | * Lists all tickets that have been issued to remote | ||
406 | * identites (relying parties) | ||
407 | * | ||
408 | * @param h the identity provider to use | ||
409 | * @param identity the issuing identity | ||
410 | * @param error_cb function to call on error (i.e. disconnect), | ||
411 | * the handle is afterwards invalid | ||
412 | * @param error_cb_cls closure for @a error_cb | ||
413 | * @param proc function to call on each ticket; it | ||
414 | * will be called repeatedly with a value (if available) | ||
415 | * @param proc_cls closure for @a proc | ||
416 | * @param finish_cb function to call on completion | ||
417 | * the handle is afterwards invalid | ||
418 | * @param finish_cb_cls closure for @a finish_cb | ||
419 | * @return an iterator handle to use for iteration | ||
420 | */ | ||
421 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * | ||
422 | GNUNET_IDENTITY_PROVIDER_idp_ticket_iteration_start (struct GNUNET_IDENTITY_PROVIDER_Handle *h, | ||
423 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | ||
424 | GNUNET_SCHEDULER_TaskCallback error_cb, | ||
425 | void *error_cb_cls, | ||
426 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | ||
427 | void *proc_cls, | ||
428 | GNUNET_SCHEDULER_TaskCallback finish_cb, | ||
429 | void *finish_cb_cls); | ||
430 | |||
431 | /** | ||
419 | * Lists all tickets that have been issued to remote | 432 | * Lists all tickets that have been issued to remote |
420 | * identites (relying parties) | 433 | * identites (relying parties) |
421 | * | 434 | * |
422 | * @param id the identity provider to use | 435 | * @param id the identity provider to use |
423 | * @param identity the issuing identity | 436 | * @param identity the issuing identity |
424 | * @param cb the callback to use | 437 | * @param error_cb function to call on error (i.e. disconnect), |
425 | * @param cb_cls the callback closure | 438 | * the handle is afterwards invalid |
426 | * @return handle to abort the operation | 439 | * @param error_cb_cls closure for @a error_cb |
440 | * @param proc function to call on each ticket; it | ||
441 | * will be called repeatedly with a value (if available) | ||
442 | * @param proc_cls closure for @a proc | ||
443 | * @param finish_cb function to call on completion | ||
444 | * the handle is afterwards invalid | ||
445 | * @param finish_cb_cls closure for @a finish_cb | ||
446 | * @return an iterator handle to use for iteration | ||
427 | */ | 447 | */ |
428 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 448 | struct GNUNET_IDENTITY_PROVIDER_TicketIterator * |
429 | GNUNET_IDENTITY_PROVIDER_idp_tickets_list (struct GNUNET_IDENTITY_PROVIDER_Handle *id, | 449 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_start_rp (struct GNUNET_IDENTITY_PROVIDER_Handle *h, |
430 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 450 | const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, |
431 | GNUNET_IDENTITY_PROVIDER_TicketCallback *cb, | 451 | GNUNET_SCHEDULER_TaskCallback error_cb, |
432 | void *cb_cls); | 452 | void *error_cb_cls, |
453 | GNUNET_IDENTITY_PROVIDER_TicketCallback proc, | ||
454 | void *proc_cls, | ||
455 | GNUNET_SCHEDULER_TaskCallback finish_cb, | ||
456 | void *finish_cb_cls); | ||
433 | 457 | ||
434 | /** TODO | 458 | /** |
435 | * Lists all attributes that are shared with this identity | 459 | * Calls the record processor specified in #GNUNET_IDENTITY_PROVIDER_ticket_iteration_start |
436 | * by remote parties | 460 | * for the next record. |
437 | * | 461 | * |
438 | * @param id identity provider service to use | 462 | * @param it the iterator |
439 | * @param identity the identity (relying party) | ||
440 | * @param cb the result callback | ||
441 | * @param cb_cls the result callback closure | ||
442 | * @return handle to abort the operation | ||
443 | */ | 463 | */ |
444 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 464 | void |
445 | GNUNET_IDENTITY_PROVIDER_rp_attributes_list (struct GNUNET_IDENTITY_PROVIDER_Handle *id, | 465 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); |
446 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity, | 466 | |
447 | GNUNET_IDENTITY_PROVIDER_AttributeResult *cb, | 467 | /** |
448 | void *cb_cls); | 468 | * Stops iteration and releases the idp handle for further calls. Must |
469 | * be called on any iteration that has not yet completed prior to calling | ||
470 | * #GNUNET_IDENTITY_PROVIDER_disconnect. | ||
471 | * | ||
472 | * @param it the iterator | ||
473 | */ | ||
474 | void | ||
475 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); | ||
449 | 476 | ||
450 | /** TODO remove DEPRECATED | 477 | /** TODO remove DEPRECATED |
451 | * Issue a token for a specific audience. | 478 | * Issue a token for a specific audience. |