diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 08:45:40 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 08:45:40 +0200 |
commit | 1d4f5263ae72c12a42ec166ec8b1769620baaeda (patch) | |
tree | 4c5c6051b4ae968c4b3a5c82f1d51da452e9f1d3 /src/reclaim/oidc_helper.h | |
parent | 6e764f4abd8a3f14f03a5a167af7d5cb703fd1d5 (diff) | |
download | gnunet-1d4f5263ae72c12a42ec166ec8b1769620baaeda.tar.gz gnunet-1d4f5263ae72c12a42ec166ec8b1769620baaeda.zip |
reclaim: Refactoring and more standards compliance with respect to scopes
Diffstat (limited to 'src/reclaim/oidc_helper.h')
-rw-r--r-- | src/reclaim/oidc_helper.h | 30 |
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 | */ |
51 | char* | 51 | char* |
52 | OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | 52 | OIDC_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); | |||
125 | int | 125 | int |
126 | OIDC_access_token_parse (const char* token, | 126 | OIDC_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 | */ | ||
138 | enum GNUNET_GenericReturnValue | ||
139 | OIDC_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 | */ | ||
151 | char * | ||
152 | OIDC_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 |