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

Add multiple email addresses and verified email addresses per user support #822

Conversation

lashinijay
Copy link
Contributor

Proposed changes in this pull request

With this improvement users will be able to store multiple email addresses in newly introduced custom claim http://wso2.org/claims/emailAddresses and multiple verified email addresses in http://wso2.org/claims/verifiedEmailAddresses claim.

This feature will be enabled by default for the latest product, however with the following config in deployment.toml, the multiple support for email addresses and mobile numbers can be disabled.

[support_multiple_emails_and_mobile_numbers_per_user]
enabled = false

case 01
verifiedEmailAddresses claim can only be updated when Enable user email verification on update is enabled.
case 02
And also when support multiple email and mobile numbers per user and Enable user email verification on update is both enabled, the primary email address of the user (http://wso2.org/claims/emailaddress) can only be updated to one of the existing email addresses in verifiedEmailAddresses claim.
case 03
when support multiple email and mobile numbers per useris disabled andEnable user email verification on update` is enabled, users can directly update the primary email address (http://wso2.org/claims/emailaddress) which will initiate the email verification process.

Related Issue

*/
private List<String> getListOfEmailAddressesFromString(String emails) {

return emails != null ? new LinkedList<>(Arrays.asList(emails.split(","))).stream().map(String::trim)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use StringUtils.isBlank()

@lashinijay
Copy link
Contributor Author

Closing as these changes are included in #817

@lashinijay lashinijay closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants