2 This file is part of GNUnet.
3 Copyright (C) 2016 GNUnet e.V.
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public Liceidentity as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public Liceidentity for more details.
15 You should have received a copy of the GNU General Public Liceidentity
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 * @author Martin Schanzenbach
23 * @file identity-provider/identity_provider.h
25 * @brief Common type definitions for the identity provider
28 #ifndef IDENTITY_PROVIDER_H
29 #define IDENTITY_PROVIDER_H
31 #include "gnunet_common.h"
34 GNUNET_NETWORK_STRUCT_BEGIN
39 struct GNUNET_IDENTITY_PROVIDER_Token
42 * The JWT representation of the identity token
50 struct GNUNET_IDENTITY_PROVIDER_Ticket
53 * The Base64 representation of the ticket
59 * Answer from service to client after issue operation
61 struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage
64 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE
66 struct GNUNET_MessageHeader header;
69 * Unique identifier for this request (for key collisions).
71 uint32_t id GNUNET_PACKED;
73 /* followed by 0-terminated label,ticket,token */
79 * Ticket exchange message.
81 struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage
84 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
86 struct GNUNET_MessageHeader header;
89 * Unique identifier for this request (for key collisions).
91 uint32_t id GNUNET_PACKED;
94 * Nonce found in ticket. NBO
97 uint64_t ticket_nonce GNUNET_PACKED;
99 /* followed by 0-terminated token */
106 * Client requests IdP to issue token.
108 struct GNUNET_IDENTITY_PROVIDER_IssueMessage
111 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
113 struct GNUNET_MessageHeader header;
116 * Unique identifier for this request (for key collisions).
118 uint32_t id GNUNET_PACKED;
122 * Issuer identity private key
124 struct GNUNET_CRYPTO_EcdsaPrivateKey iss_key;
127 * Audience public key
129 struct GNUNET_CRYPTO_EcdsaPublicKey aud_key;
137 * Expiration of token in NBO.
139 struct GNUNET_TIME_AbsoluteNBO expiration;
142 /* followed by 0-terminated comma-separated scope list */
148 * Use to exchange a ticket for a token
150 struct GNUNET_IDENTITY_PROVIDER_ExchangeMessage
153 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
155 struct GNUNET_MessageHeader header;
158 * Unique identifier for this request (for key collisions).
160 uint32_t id GNUNET_PACKED;
163 * Audience identity private key
165 struct GNUNET_CRYPTO_EcdsaPrivateKey aud_privkey;
167 /* followed by 0-terminated ticket string */
172 GNUNET_NETWORK_STRUCT_END