aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/oidc_helper.h')
-rw-r--r--src/reclaim/oidc_helper.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h
index e713dab62..10a6f3d1f 100644
--- a/src/reclaim/oidc_helper.h
+++ b/src/reclaim/oidc_helper.h
@@ -44,6 +44,7 @@
44 * @param aud_key the public of the audience 44 * @param aud_key the public of the audience
45 * @param sub_key the public key of the subject 45 * @param sub_key the public key of the subject
46 * @param attrs the attribute list 46 * @param attrs the attribute list
47 * @param presentations credential presentation list (may be empty)
47 * @param expiration_time the validity of the token 48 * @param expiration_time the validity of the token
48 * @param secret_key the key used to sign the JWT 49 * @param secret_key the key used to sign the JWT
49 * @return a new base64-encoded JWT string. 50 * @return a new base64-encoded JWT string.
@@ -51,8 +52,8 @@
51char* 52char*
52OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, 53OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
53 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 54 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
54 struct GNUNET_RECLAIM_AttributeList *attrs, 55 const struct GNUNET_RECLAIM_AttributeList *attrs,
55 struct GNUNET_RECLAIM_AttestationList *attests, 56 const struct GNUNET_RECLAIM_PresentationList *presentations,
56 const struct GNUNET_TIME_Relative *expiration_time, 57 const struct GNUNET_TIME_Relative *expiration_time,
57 const char *nonce, 58 const char *nonce,
58 const char *secret_key); 59 const char *secret_key);
@@ -64,6 +65,7 @@ OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
64 * @param issuer the issuer of the ticket, used to sign the ticket and nonce 65 * @param issuer the issuer of the ticket, used to sign the ticket and nonce
65 * @param ticket the ticket to include in the code 66 * @param ticket the ticket to include in the code
66 * @param attrs list of attributes to share 67 * @param attrs list of attributes to share
68 * @param presentations credential presentation list
67 * @param nonce the nonce to include in the code 69 * @param nonce the nonce to include in the code
68 * @param code_challenge PKCE code challenge 70 * @param code_challenge PKCE code challenge
69 * @return a new authorization code (caller must free) 71 * @return a new authorization code (caller must free)
@@ -71,8 +73,8 @@ OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
71char* 73char*
72OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 74OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
73 const struct GNUNET_RECLAIM_Ticket *ticket, 75 const struct GNUNET_RECLAIM_Ticket *ticket,
74 struct GNUNET_RECLAIM_AttributeList *attrs, 76 const struct GNUNET_RECLAIM_AttributeList *attrs,
75 struct GNUNET_RECLAIM_AttestationList *attests, 77 const struct GNUNET_RECLAIM_PresentationList *presentations,
76 const char *nonce, 78 const char *nonce,
77 const char *code_challenge); 79 const char *code_challenge);
78 80
@@ -86,6 +88,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
86 * @param code_verfier PKCE code verifier 88 * @param code_verfier PKCE code verifier
87 * @param ticket where to store the ticket 89 * @param ticket where to store the ticket
88 * @param attrs the attributes found in the code 90 * @param attrs the attributes found in the code
91 * @param presentations credential presentation list
89 * @param nonce where to store the nonce 92 * @param nonce where to store the nonce
90 * @return GNUNET_OK if successful, else GNUNET_SYSERR 93 * @return GNUNET_OK if successful, else GNUNET_SYSERR
91 */ 94 */
@@ -95,7 +98,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *ecdsa_pub,
95 const char *code_verifier, 98 const char *code_verifier,
96 struct GNUNET_RECLAIM_Ticket *ticket, 99 struct GNUNET_RECLAIM_Ticket *ticket,
97 struct GNUNET_RECLAIM_AttributeList **attrs, 100 struct GNUNET_RECLAIM_AttributeList **attrs,
98 struct GNUNET_RECLAIM_AttestationList **attests, 101 struct GNUNET_RECLAIM_PresentationList **presentations,
99 char **nonce); 102 char **nonce);
100 103
101/** 104/**
@@ -136,8 +139,8 @@ OIDC_access_token_parse (const char* token,
136 * @return GNUNET_YES if attribute is implcitly requested 139 * @return GNUNET_YES if attribute is implcitly requested
137 */ 140 */
138enum GNUNET_GenericReturnValue 141enum GNUNET_GenericReturnValue
139OIDC_check_scopes_for_claim_request (const char*scopes, 142OIDC_check_scopes_for_claim_request (const char *scopes,
140 const char*attr); 143 const char *attr);
141 144
142 145
143/** 146/**
@@ -145,12 +148,12 @@ OIDC_check_scopes_for_claim_request (const char*scopes,
145 * 148 *
146 * @param sub_key the subject (user) 149 * @param sub_key the subject (user)
147 * @param attrs user attribute list 150 * @param attrs user attribute list
148 * @param attests user attribute attestation list (may be empty) 151 * @param presentations credential presentation list
149 * @return Userinfo JSON 152 * @return Userinfo JSON
150 */ 153 */
151char * 154char *
152OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 155OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
153 struct GNUNET_RECLAIM_AttributeList *attrs, 156 const struct GNUNET_RECLAIM_AttributeList *attrs,
154 struct GNUNET_RECLAIM_AttestationList *attests); 157 const struct GNUNET_RECLAIM_PresentationList *presentations);
155 158
156#endif 159#endif