aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-27 10:04:01 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-27 10:04:01 +0200
commit4fca11423e6fd34032848a1b8684b3c06197e6e5 (patch)
tree473b8b7ba1a1e621bea1993f9ad404657378e731 /src/reclaim/oidc_helper.c
parentfcad7dd854dd485bc992e6d29408b5b1f27907d5 (diff)
downloadgnunet-4fca11423e6fd34032848a1b8684b3c06197e6e5.tar.gz
gnunet-4fca11423e6fd34032848a1b8684b3c06197e6e5.zip
RECLAIM/OIDC: simplify access token
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r--src/reclaim/oidc_helper.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 7b4d8ee37..f0691796b 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -513,15 +513,13 @@ OIDC_build_token_response (const char *access_token,
513char * 513char *
514OIDC_access_token_new () 514OIDC_access_token_new ()
515{ 515{
516 char *access_token_number;
517 char *access_token; 516 char *access_token;
518 uint64_t random_number; 517 uint64_t random_number;
519 518
520 random_number = 519 random_number =
521 GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE, UINT64_MAX); 520 GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE, UINT64_MAX);
522 GNUNET_asprintf (&access_token_number, "%" PRIu64, random_number); 521 GNUNET_STRINGS_base64_encode (&random_number,
523 GNUNET_STRINGS_base64_encode (access_token_number, 522 sizeof (uint64_t),
524 strlen (access_token_number),
525 &access_token); 523 &access_token);
526 return access_token; 524 return access_token;
527} 525}