return json_str;
}
+
static void
replace_char (char *str, char find, char replace)
{
}
}
+
// RFC4648
static void
fix_base64 (char *str)
replace_char (str, '/', '_');
}
+
/**
* Create a JWT from attributes
*
return result;
}
+
/* Converts a hex character to its integer value */
static char
from_hex (char ch)
return isdigit (ch) ? ch - '0' : tolower (ch) - 'a' + 10;
}
+
/* Converts an integer value to its hex character*/
static char
to_hex (char code)
return hex[code & 15];
}
+
/* Returns a url-encoded version of str */
/* IMPORTANT: be sure to free() the returned string after use */
static char *
return buf;
}
+
/**
* Returns base64 encoded string urlencoded
*
GNUNET_CRYPTO_symmetric_encrypt (payload, payload_len, &key, &iv, buf));
}
+
/**
* Builds an OIDC authorization code including
* a reclaim ticket and nonce
// Assign nonce
nonce = 0;
payload_len = sizeof(struct OIDC_Parameters);
- if ((NULL != nonce_str)&& (strcmp ("", nonce_str) != 0))
+ if ((NULL != nonce_str) && (strcmp ("", nonce_str) != 0))
{
if ((1 != sscanf (nonce_str, "%u", &nonce)) || (nonce > UINT32_MAX))
{
json_decref (root_json);
}
+
/**
* Generate a new access token
*/