Responder: Add completeUri in EIdP JSON message#8422
Responder: Add completeUri in EIdP JSON message#8422eisenmann-b1 wants to merge 1 commit intoSSSD:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a completeUri field to the EIdP JSON message. The implementation is straightforward, but the associated tests appear to be broken as the test expectations were not updated. I've also included a suggestion to conditionally add the new field to the JSON payload to align better with the intent described in the pull request description.
| "role", "eidp", | ||
| "initPrompt", auth_data->oauth2->init_prompt, | ||
| "linkPrompt", auth_data->oauth2->link_prompt, | ||
| "completeUri", auth_data->oauth2->complete_uri, |
There was a problem hiding this comment.
The pull request description mentions that completeUri should ideally be used "if non-empty". To better align with this, consider omitting the completeUri field from the JSON object when its value is NULL or an empty string. This would simplify parsing on the consumer side, as it would only need to check for the key's existence.
This would require refactoring the json_pack() call to build the object by adding fields conditionally, for example:
json_oauth2 = json_pack("{s:s,s:s,s:s,s:s,s:s,s:i}",
"name", "Web Login",
"role", "eidp",
"initPrompt", auth_data->oauth2->init_prompt,
"linkPrompt", auth_data->oauth2->link_prompt,
"uri", auth_data->oauth2->uri,
"code", auth_data->oauth2->code,
"timeout", 300);
if (json_oauth2 == NULL) { ... }
if (auth_data->oauth2->complete_uri && *auth_data->oauth2->complete_uri) {
json_object_set_new(json_oauth2, "completeUri",
json_string(auth_data->oauth2->complete_uri));
// ... error handling ...
}771de11 to
4d57013
Compare
|
Hi @eisenmann-b1, could you please rebase? |
4d57013 to
83958ce
Compare
|
Do you mind updating the design page available at https://github.com/SSSD/sssd.io/blob/master/src/design-pages/passwordless_gdm.rst? |
Done. |
This adds
verification_uri_completeas JSON parametercompleteUriin the message provided to GDM.Ideally, this would be used for QR codes, if non-empty.