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;
68 /* followed by 0-terminated label,ticket,token */
74 * Ticket exchange message.
76 struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage
79 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
81 struct GNUNET_MessageHeader header;
84 * Number of bytes in token string including 0-termination, in NBO;
87 uint16_t name_len GNUNET_PACKED;
89 /* followed by 0-terminated token */
96 * Client requests IdP to issue token.
98 struct GNUNET_IDENTITY_PROVIDER_IssueMessage
101 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
103 struct GNUNET_MessageHeader header;
106 * Issuer identity private key
108 struct GNUNET_CRYPTO_EcdsaPrivateKey iss_key;
111 * Audience public key
113 struct GNUNET_CRYPTO_EcdsaPublicKey aud_key;
121 * Expiration of token in NBO.
123 struct GNUNET_TIME_AbsoluteNBO expiration;
126 /* followed by 0-terminated comma-separated scope list */
132 * Use to exchange a ticket for a token
134 struct GNUNET_IDENTITY_PROVIDER_ExchangeMessage
137 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
139 struct GNUNET_MessageHeader header;
142 * Audience identity private key
144 struct GNUNET_CRYPTO_EcdsaPrivateKey aud_privkey;
146 /* followed by 0-terminated ticket string */
151 GNUNET_NETWORK_STRUCT_END