Skip to content
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

SDKS-3227_Skipping type 4 TextOutputCallbacks #434

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

george-bafaloukas-forgerock
Copy link
Contributor

Added conditional sbmittion of TextOutput Callbacks based on the type skipping 4

Updated the sample apps to handle the ScriptedTextOutputCallbacks and long content better

JIRA Ticket

Please link jira ticket here

Description

Added conditional sbmittion of TextOutput Callbacks based on the type skipping 4

Updated the sample apps to handle the ScriptedTextOutputCallbacks and long content better

…, skipping 4

Updated the sample apps to handle the ScriptedTextOutputCallbacks and long content better
@@ -59,7 +62,16 @@ JSONObject toJsonObject() throws JSONException {
}
JSONArray array = new JSONArray();
for (Callback cb : callbacks) {
array.put(new JSONObject(cb.getContent()));
if ((cb instanceof TextOutputCallback)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would handle it on receiving the Callback,
org.forgerock.android.auth.callback.TextOutputCallback#setAttribute
Removing the content when msg type is 4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Receiving the callback is no problem for the SDK or the server side. Submitting back is what causes issues. I am of the opinion that if we keep the callback and just remove it before submitting, we are more open to anyone using this to pass data (valuable ones not a JS script) back to the SDK. So instead of dropping the support, we just make that an non-submittable callback. Let's discuss this when you come online.

spetrov
spetrov previously approved these changes Jul 23, 2024
Copy link
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

witrisna
witrisna previously approved these changes Jul 24, 2024
@spetrov spetrov force-pushed the SDKS-3227_TextOutputCallbacks-Type4 branch from fecd5dd to 68211c7 Compare July 24, 2024 17:06
Copy link
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@spetrov spetrov merged commit 06cf8c7 into develop Jul 24, 2024
2 of 3 checks passed
@spetrov spetrov deleted the SDKS-3227_TextOutputCallbacks-Type4 branch July 24, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants