diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-06 16:50:32 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-06 16:50:32 +0200 |
commit | cc838240da0d28fa1fc6d7a97da2808a7a622365 (patch) | |
tree | 49603d5a1e1db330863b3465ef052ca6f9b2b04e /src/include/gnunet_identity_provider_service.h | |
parent | 7807374c7247af1d139ff70b4af047c227229a6e (diff) | |
download | gnunet-cc838240da0d28fa1fc6d7a97da2808a7a622365.tar.gz gnunet-cc838240da0d28fa1fc6d7a97da2808a7a622365.zip |
-remove deprecated
Diffstat (limited to 'src/include/gnunet_identity_provider_service.h')
-rw-r--r-- | src/include/gnunet_identity_provider_service.h | 137 |
1 files changed, 3 insertions, 134 deletions
diff --git a/src/include/gnunet_identity_provider_service.h b/src/include/gnunet_identity_provider_service.h index 198e2f918..fb5131567 100644 --- a/src/include/gnunet_identity_provider_service.h +++ b/src/include/gnunet_identity_provider_service.h | |||
@@ -57,14 +57,9 @@ struct GNUNET_IDENTITY_PROVIDER_Handle; | |||
57 | struct GNUNET_IDENTITY_PROVIDER_Token; | 57 | struct GNUNET_IDENTITY_PROVIDER_Token; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Handle for a ticket DEPRECATED | ||
61 | */ | ||
62 | struct GNUNET_IDENTITY_PROVIDER_Ticket; | ||
63 | |||
64 | /** | ||
65 | * The ticket | 60 | * The ticket |
66 | */ | 61 | */ |
67 | struct GNUNET_IDENTITY_PROVIDER_Ticket2 | 62 | struct GNUNET_IDENTITY_PROVIDER_Ticket |
68 | { | 63 | { |
69 | /** | 64 | /** |
70 | * The ticket issuer | 65 | * The ticket issuer |
@@ -170,38 +165,6 @@ struct GNUNET_IDENTITY_PROVIDER_AttributeListEntry | |||
170 | }; | 165 | }; |
171 | 166 | ||
172 | /** | 167 | /** |
173 | * Method called when a token has been exchanged for a ticket. | ||
174 | * On success returns a token | ||
175 | * | ||
176 | * @param cls closure | ||
177 | * @param token the token | ||
178 | */ | ||
179 | typedef void | ||
180 | (*GNUNET_IDENTITY_PROVIDER_ExchangeCallback)(void *cls, | ||
181 | const struct GNUNET_IDENTITY_PROVIDER_Token *token, | ||
182 | uint64_t ticket_nonce); | ||
183 | |||
184 | /** TODO DEPRECATED | ||
185 | * Method called when a token has been issued. | ||
186 | * On success returns a ticket that can be given to the audience to retrive the | ||
187 | * token | ||
188 | * | ||
189 | * @param cls closure | ||
190 | * @param grant the label in GNS pointing to the token | ||
191 | * @param ticket the ticket | ||
192 | * @param token the issued token | ||
193 | * @param name name assigned by the user for this ego, | ||
194 | * NULL if the user just deleted the ego and it | ||
195 | * must thus no longer be used | ||
196 | */ | ||
197 | typedef void | ||
198 | (*GNUNET_IDENTITY_PROVIDER_IssueCallback)(void *cls, | ||
199 | const char *grant, | ||
200 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | ||
201 | const struct GNUNET_IDENTITY_PROVIDER_Token *token); | ||
202 | |||
203 | |||
204 | /** | ||
205 | * Connect to the identity provider service. | 168 | * Connect to the identity provider service. |
206 | * | 169 | * |
207 | * @param cfg Configuration to contact the identity provider service. | 170 | * @param cfg Configuration to contact the identity provider service. |
@@ -340,7 +303,7 @@ GNUNET_IDENTITY_PROVIDER_get_attributes_stop (struct GNUNET_IDENTITY_PROVIDER_At | |||
340 | */ | 303 | */ |
341 | typedef void | 304 | typedef void |
342 | (*GNUNET_IDENTITY_PROVIDER_TicketCallback)(void *cls, | 305 | (*GNUNET_IDENTITY_PROVIDER_TicketCallback)(void *cls, |
343 | const struct GNUNET_IDENTITY_PROVIDER_Ticket2 *ticket); | 306 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket); |
344 | 307 | ||
345 | /** | 308 | /** |
346 | * Issues a ticket to another identity. The identity may use | 309 | * Issues a ticket to another identity. The identity may use |
@@ -397,7 +360,7 @@ GNUNET_IDENTITY_PROVIDER_idp_ticket_revoke (struct GNUNET_IDENTITY_PROVIDER_Hand | |||
397 | struct GNUNET_IDENTITY_PROVIDER_Operation * | 360 | struct GNUNET_IDENTITY_PROVIDER_Operation * |
398 | GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id, | 361 | GNUNET_IDENTITY_PROVIDER_rp_ticket_consume (struct GNUNET_IDENTITY_PROVIDER_Handle *id, |
399 | const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity, | 362 | const struct GNUNET_CRYPTO_EcdsaPrivateKey * identity, |
400 | const struct GNUNET_IDENTITY_PROVIDER_Ticket2 *ticket, | 363 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, |
401 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, | 364 | GNUNET_IDENTITY_PROVIDER_AttributeResult cb, |
402 | void *cb_cls); | 365 | void *cb_cls); |
403 | 366 | ||
@@ -474,50 +437,6 @@ GNUNET_IDENTITY_PROVIDER_ticket_iteration_next (struct GNUNET_IDENTITY_PROVIDER_ | |||
474 | void | 437 | void |
475 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); | 438 | GNUNET_IDENTITY_PROVIDER_ticket_iteration_stop (struct GNUNET_IDENTITY_PROVIDER_TicketIterator *it); |
476 | 439 | ||
477 | /** TODO remove DEPRECATED | ||
478 | * Issue a token for a specific audience. | ||
479 | * | ||
480 | * @param id identity provider service to use | ||
481 | * @param iss issuer (identity) | ||
482 | * @param aud audience (identity) | ||
483 | * @param scope the identity attributes requested, comman separated | ||
484 | * @param expiration the token expiration | ||
485 | * @param nonce the nonce that will be included in token and ticket | ||
486 | * @param cb callback to call with result | ||
487 | * @param cb_cls closure | ||
488 | * @return handle to abort the operation | ||
489 | */ | ||
490 | struct GNUNET_IDENTITY_PROVIDER_Operation * | ||
491 | GNUNET_IDENTITY_PROVIDER_issue_token (struct GNUNET_IDENTITY_PROVIDER_Handle *id, | ||
492 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *iss_key, | ||
493 | const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | ||
494 | const char* scope, | ||
495 | const char* vattr, | ||
496 | struct GNUNET_TIME_Absolute expiration, | ||
497 | uint64_t nonce, | ||
498 | GNUNET_IDENTITY_PROVIDER_IssueCallback cb, | ||
499 | void *cb_cls); | ||
500 | |||
501 | |||
502 | /** TODO remove DEPRECATED | ||
503 | * Exchange a ticket for a token. Intended to be used by audience that | ||
504 | * received a ticket. | ||
505 | * | ||
506 | * @param id identity provider service to use | ||
507 | * @param ticket the ticket to exchange | ||
508 | * @param aud_privkey the audience of the ticket | ||
509 | * @param cont function to call once the operation finished | ||
510 | * @param cont_cls closure for @a cont | ||
511 | * @return handle to abort the operation | ||
512 | */ | ||
513 | struct GNUNET_IDENTITY_PROVIDER_Operation * | ||
514 | GNUNET_IDENTITY_PROVIDER_exchange_ticket (struct GNUNET_IDENTITY_PROVIDER_Handle *id, | ||
515 | const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket, | ||
516 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *aud_privkey, | ||
517 | GNUNET_IDENTITY_PROVIDER_ExchangeCallback cont, | ||
518 | void *cont_cls); | ||
519 | |||
520 | |||
521 | /** | 440 | /** |
522 | * Disconnect from identity provider service. | 441 | * Disconnect from identity provider service. |
523 | * | 442 | * |
@@ -538,56 +457,6 @@ GNUNET_IDENTITY_PROVIDER_disconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h); | |||
538 | void | 457 | void |
539 | GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op); | 458 | GNUNET_IDENTITY_PROVIDER_cancel (struct GNUNET_IDENTITY_PROVIDER_Operation *op); |
540 | 459 | ||
541 | |||
542 | /** | ||
543 | * Convenience API | ||
544 | */ | ||
545 | |||
546 | /** | ||
547 | * Destroy token | ||
548 | * | ||
549 | * @param token the token | ||
550 | */ | ||
551 | void | ||
552 | GNUNET_IDENTITY_PROVIDER_token_destroy(struct GNUNET_IDENTITY_PROVIDER_Token *token); | ||
553 | |||
554 | /** | ||
555 | * Returns string representation of token. A JSON-Web-Token. | ||
556 | * | ||
557 | * @param token the token | ||
558 | * @return The JWT (must be freed) | ||
559 | */ | ||
560 | char * | ||
561 | GNUNET_IDENTITY_PROVIDER_token_to_string (const struct GNUNET_IDENTITY_PROVIDER_Token *token); | ||
562 | |||
563 | /** | ||
564 | * Returns string representation of ticket. Base64-Encoded | ||
565 | * | ||
566 | * @param ticket the ticket | ||
567 | * @return the Base64-Encoded ticket | ||
568 | */ | ||
569 | char * | ||
570 | GNUNET_IDENTITY_PROVIDER_ticket_to_string (const struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket); | ||
571 | |||
572 | /** | ||
573 | * Created a ticket from a string (Base64 encoded ticket) | ||
574 | * | ||
575 | * @param input Base64 encoded ticket | ||
576 | * @param ticket pointer where the ticket is stored | ||
577 | * @return GNUNET_OK | ||
578 | */ | ||
579 | int | ||
580 | GNUNET_IDENTITY_PROVIDER_string_to_ticket (const char* input, | ||
581 | struct GNUNET_IDENTITY_PROVIDER_Ticket **ticket); | ||
582 | |||
583 | /** | ||
584 | * Destroys a ticket | ||
585 | * | ||
586 | * @param ticket the ticket to destroy | ||
587 | */ | ||
588 | void | ||
589 | GNUNET_IDENTITY_PROVIDER_ticket_destroy(struct GNUNET_IDENTITY_PROVIDER_Ticket *ticket); | ||
590 | |||
591 | #if 0 /* keep Emacsens' auto-indent happy */ | 460 | #if 0 /* keep Emacsens' auto-indent happy */ |
592 | { | 461 | { |
593 | #endif | 462 | #endif |