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.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h
index e71a7ad1c..e713dab62 100644
--- a/src/reclaim/oidc_helper.h
+++ b/src/reclaim/oidc_helper.h
@@ -49,7 +49,7 @@
49 * @return a new base64-encoded JWT string. 49 * @return a new base64-encoded JWT string.
50 */ 50 */
51char* 51char*
52OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, 52OIDC_generate_id_token (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
53 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key, 53 const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
54 struct GNUNET_RECLAIM_AttributeList *attrs, 54 struct GNUNET_RECLAIM_AttributeList *attrs,
55 struct GNUNET_RECLAIM_AttestationList *attests, 55 struct GNUNET_RECLAIM_AttestationList *attests,
@@ -125,4 +125,32 @@ OIDC_access_token_new (const struct GNUNET_RECLAIM_Ticket *ticket);
125int 125int
126OIDC_access_token_parse (const char* token, 126OIDC_access_token_parse (const char* token,
127 struct GNUNET_RECLAIM_Ticket **ticket); 127 struct GNUNET_RECLAIM_Ticket **ticket);
128
129
130/**
131 * Checks if a claim is implicitly requested through standard
132 * scope(s)
133 *
134 * @param scopes the scopes which have been requested
135 * @param attr the attribute name to check
136 * @return GNUNET_YES if attribute is implcitly requested
137 */
138enum GNUNET_GenericReturnValue
139OIDC_check_scopes_for_claim_request (const char*scopes,
140 const char*attr);
141
142
143/**
144 * Generate userinfo JSON as string
145 *
146 * @param sub_key the subject (user)
147 * @param attrs user attribute list
148 * @param attests user attribute attestation list (may be empty)
149 * @return Userinfo JSON
150 */
151char *
152OIDC_generate_userinfo (const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
153 struct GNUNET_RECLAIM_AttributeList *attrs,
154 struct GNUNET_RECLAIM_AttestationList *attests);
155
128#endif 156#endif