gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -also clear cache on lookup success


From: gnunet
Subject: [gnunet] branch master updated: -also clear cache on lookup success
Date: Wed, 22 Jun 2022 20:19:47 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 599c31dff -also clear cache on lookup success
599c31dff is described below

commit 599c31dff16d2e85898cd6d69c65e338e2c54447
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Jun 22 20:19:43 2022 +0200

    -also clear cache on lookup success
---
 src/reclaim/plugin_rest_openid_connect.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/reclaim/plugin_rest_openid_connect.c 
b/src/reclaim/plugin_rest_openid_connect.c
index 769ce553f..8eb30aded 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -2448,13 +2448,32 @@ consume_ticket (void *cls,
   struct GNUNET_RECLAIM_AttributeListEntry *ale;
   struct GNUNET_RECLAIM_PresentationListEntry *atle;
   struct MHD_Response *resp;
+  struct GNUNET_HashCode cache_key;
   char *result_str;
+  char *cached_code;
 
   if (NULL != handle->consume_timeout_op)
     GNUNET_SCHEDULER_cancel (handle->consume_timeout_op);
   handle->consume_timeout_op = NULL;
   handle->idp_op = NULL;
 
+  /**
+   * We received a reply. In any case clear the cache.
+   */
+  GNUNET_CRYPTO_hash (handle->access_token,
+                      strlen (handle->access_token),
+                      &cache_key);
+  cached_code = GNUNET_CONTAINER_multihashmap_get (oidc_code_cache,
+                                                   &cache_key);
+  if (NULL != cached_code)
+  {
+    GNUNET_CONTAINER_multihashmap_remove (oidc_code_cache,
+                                          &cache_key,
+                                          cached_code);
+    GNUNET_free (cached_code);
+  }
+
+
   if (NULL == identity)
   {
     result_str = OIDC_generate_userinfo (&handle->ticket.identity,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]