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

Supporting application/x-www-form-urlencoded payload in custom sms provider. #20439

Closed
pandukakarunasena opened this issue May 23, 2024 · 0 comments · Fixed by wso2-extensions/identity-local-auth-smsotp#22
Assignees
Labels

Comments

@pandukakarunasena
Copy link

Describe the issue:

The current implementation does not support sending data in the application/x-www-form-urlencoded format. Instead, the SMS body template placeholders are replaced, assuming the final data object is a JSON object[1]. This causes failures in receiving SMS OTPs when the custom SMS provider requires data in application/x-www-form-urlencoded format. If only JSON is supported, the phrase "The content type of the API request. Accepted values are 'FORM' or 'JSON''" should be removed from the management console.

How to reproduce:

Configure a custom sms provider with content type FORM and use template as advised.

Expected behavior:

Configure a custom SMS provider to use the content type FORM( application/x-www-form-urlencoded) and follow the recommended template guidelines.

Environment information (Please complete the following information; remove any unnecessary fields) :

  • Product Version: [e.g., IS 7.0.0]

[1] https://github.com/wso2-extensions/identity-local-auth-smsotp/blob/v1.0.8/components/org.wso2.carbon.identity.local.auth.smsotp.provider/src/main/java/org/wso2/carbon/identity/local/auth/smsotp/provider/impl/CustomProvider.java#L110C8-L112C74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants