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

added function to store user identity object #480

Merged
merged 2 commits into from
Sep 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modules/userId/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export let syncDelay;
/** @type {(number|undefined)} */
export let auctionDelay;

/** @type {(Object|undefined)} */
let userIdentity;
/** @param {Submodule[]} submodules */
export function setSubmoduleRegistry(submodules) {
submoduleRegistry = submodules;
Expand Down Expand Up @@ -644,6 +646,14 @@ function refreshUserIds(options, callback, moduleUpdated) {
});
}

function setUserIdentities(userIdentityData) {
userIdentity = userIdentityData;
};

function getUserIdentities() {
return userIdentity;
}

/**
* This hook returns updated list of submodules which are allowed to do get user id based on TCF 2 enforcement rules configured
*/
Expand Down Expand Up @@ -846,6 +856,9 @@ export function init(config) {
(getGlobal()).getUserIds = getUserIds;
(getGlobal()).getUserIdsAsEids = getUserIdsAsEids;
(getGlobal()).refreshUserIds = refreshUserIds;
(getGlobal()).setUserIdentities = setUserIdentities;
(getGlobal()).getUserIdentities = getUserIdentities;

}

// init config update listener to start the application
Expand Down