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

Implement migration identity keys #556

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Implement migration identity keys #556

merged 1 commit into from
Feb 10, 2023

Conversation

nzagorchev
Copy link
Contributor

What Where/Who
JIRA Issue SDK-2684
People Involved @nzagorchev

Background

Identity keys are received through getMigrateState and set in the CleverTap configuration.
Example JSON:

{
    "ct" : {
        "accountId" : "accId",
        "attributeMappings" : ...,
        "identityKeys" : ["Identity", "Phone", "Email"]
    };
    ...
}

The default value is "Identity".

If the keys are missing in the API response, or they are an empty array, they will not be updated. This means that previously saved or default keys will be used.
The keys that come from the API will not be further validated and will be passed directly as-is to the CT Config.

Implementation

  • Add the identityKeys to the MigrationManager
  • Refactor the response handling to use Codable
  • Add unit tests

Testing steps

Is this change backwards-compatible?

@nzagorchev nzagorchev merged commit cffaee2 into master Feb 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the identity-keys branch February 10, 2023 15:47
nzagorchev added a commit that referenced this pull request Feb 10, 2023
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.

2 participants