-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump oidc callback buffer, log access token content #809
Conversation
@@ -816,6 +816,25 @@ int oidc_client_close(oidc_client_t *clt, oidc_close_cb cb) { | |||
return 0; | |||
} | |||
|
|||
static const char *jwt_payload(const char *jwt) { | |||
static uint8_t payload[4096]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo, seems like it would be better to pass the length or use a #define
?
@@ -825,7 +844,12 @@ static void oidc_client_set_tokens(oidc_client_t *clt, json_object *tok_json) { | |||
if (clt->token_cb) { | |||
struct json_object *access_token = json_object_object_get(clt->tokens, "access_token"); | |||
if (access_token) { | |||
clt->token_cb(clt, OIDC_TOKEN_OK, json_object_get_string(access_token)); | |||
const char *token = json_object_get_string(access_token); | |||
ZITI_LOG(DEBUG, "access_token=%s", jwt_payload(token)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be really useful to debug! thx
@@ -502,7 +502,7 @@ static void ext_accept(uv_work_t *wr) { | |||
return; | |||
} | |||
|
|||
char buf[1024]; | |||
char buf[4096]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tokens are bigger than others... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not get receive token
- fix error when the last message header is zero-length (openziti/ziti-sdk-c#810) - bump oidc callback buffer, log access token content (openziti/ziti-sdk-c#809)
No description provided.