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.h39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h
index 2c533357e..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,
@@ -90,7 +90,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
90 * @return GNUNET_OK if successful, else GNUNET_SYSERR 90 * @return GNUNET_OK if successful, else GNUNET_SYSERR
91 */ 91 */
92int 92int
93OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, 93OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *ecdsa_pub,
94 const char *code, 94 const char *code,
95 const char *code_verifier, 95 const char *code_verifier,
96 struct GNUNET_RECLAIM_Ticket *ticket, 96 struct GNUNET_RECLAIM_Ticket *ticket,
@@ -117,7 +117,40 @@ OIDC_build_token_response (const char *access_token,
117 * Generate a new access token 117 * Generate a new access token
118 */ 118 */
119char* 119char*
120OIDC_access_token_new (); 120OIDC_access_token_new (const struct GNUNET_RECLAIM_Ticket *ticket);
121 121
122/**
123 * Parse an access token
124 */
125int
126OIDC_access_token_parse (const char* token,
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);
122 155
123#endif 156#endif