@eui/base 15.1.0-snapshot-1674550632900 → 15.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
SESSION_STORAGE_KEY_IMPERSONATED_USER_ID: "ux-openid-connect-impersonated-user-id",
|
|
21
21
|
SESSION_STORAGE_KEY_DEVELOPMENT_URL: "ux-openid-connect-dev-url",
|
|
22
22
|
SESSION_STORAGE_KEY_ORIGINAL_URL: "ux-openid-connect-original-url",
|
|
23
|
+
SESSION_STORAGE_KEY_TRACK_USERNAME: "ux-openid-connect-track-username",
|
|
23
24
|
SESSION_STORAGE_KEY_PUBLIC_KEY: "ux-openid-connect-public-key",
|
|
24
25
|
SESSION_STORAGE_KEY_PRIVATE_KEY: "ux-openid-connect-private-key",
|
|
25
26
|
SESSION_STORAGE_KEY_LOGIN_TIMESTAMP: "ux-openid-connect-login-timestamp",
|
|
@@ -739,6 +740,13 @@
|
|
|
739
740
|
}
|
|
740
741
|
},
|
|
741
742
|
|
|
743
|
+
continuePendingUserTracking: function () {
|
|
744
|
+
var fullName = sessionStorage.getItem(OpenIdConnect.SESSION_STORAGE_KEY_TRACK_USERNAME);
|
|
745
|
+
if (fullName != null && (typeof dtrum) != "undefined" && (typeof dtrum.identifyUser) == "function") {
|
|
746
|
+
dtrum.identifyUser(fullName);
|
|
747
|
+
}
|
|
748
|
+
sessionStorage.clearItem(OpenIdConnect.SESSION_STORAGE_KEY_TRACK_USERNAME);
|
|
749
|
+
},
|
|
742
750
|
|
|
743
751
|
|
|
744
752
|
// --------------- Utility functions ---------------
|
|
@@ -860,6 +868,7 @@
|
|
|
860
868
|
sessionStorage.removeItem(OpenIdConnect.SESSION_STORAGE_KEY_ID_TOKEN);
|
|
861
869
|
// Also invalidate the API Gateway token because it can be used for authentication too:
|
|
862
870
|
OpenIdConnect.clearCachedApiGatewayAccessToken();
|
|
871
|
+
OpenIdConnect.trackUserLogin();
|
|
863
872
|
|
|
864
873
|
var redirectUrl = OpenIdConnect.config.spaRedirectUrl;
|
|
865
874
|
// Also allow the redirect URL to go to localhost in case of mock OpenIDConnect servers:
|
|
@@ -973,6 +982,7 @@
|
|
|
973
982
|
firstName: tokenObject.given_name,
|
|
974
983
|
lastName: tokenObject.family_name
|
|
975
984
|
}));
|
|
985
|
+
OpenIdConnect.trackUserName(tokenObject);
|
|
976
986
|
} else {
|
|
977
987
|
console.error("Not accepting ID token; incorrect audience (SPA) detected.");
|
|
978
988
|
}
|
|
@@ -1167,6 +1177,33 @@
|
|
|
1167
1177
|
OpenIdConnect.SESSION_STORAGE_KEY_PRIVATE_KEY += applicationSuffix;
|
|
1168
1178
|
OpenIdConnect.SESSION_STORAGE_KEY_LOGIN_TIMESTAMP += applicationSuffix;
|
|
1169
1179
|
}
|
|
1180
|
+
},
|
|
1181
|
+
|
|
1182
|
+
trackUserLogin: function () {
|
|
1183
|
+
if ((typeof dtrum) != "undefined" && (typeof dtrum.actionName) == "function") {
|
|
1184
|
+
dtrum.actionName("EU Login (old client)");
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
|
|
1188
|
+
trackUserName: function (tokenObject) {
|
|
1189
|
+
if (tokenObject != null) {
|
|
1190
|
+
var firstName = tokenObject.given_name;
|
|
1191
|
+
if (firstName == "UNKNOWN") {
|
|
1192
|
+
firstName = tokenObject.sub;
|
|
1193
|
+
}
|
|
1194
|
+
var lastName = tokenObject.family_name;
|
|
1195
|
+
if (lastName == "UNKNOWN") {
|
|
1196
|
+
lastName = "Generic User";
|
|
1197
|
+
}
|
|
1198
|
+
var fullName = lastName + " " + firstName;
|
|
1199
|
+
|
|
1200
|
+
if ((typeof dtrum) != "undefined" && (typeof dtrum.identifyUser) == "function") {
|
|
1201
|
+
dtrum.identifyUser(fullName);
|
|
1202
|
+
} else {
|
|
1203
|
+
// The username will be picked up after restoring the original URL:
|
|
1204
|
+
sessionStorage.setItem(OpenIdConnect.SESSION_STORAGE_KEY_TRACK_USERNAME, fullName);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1170
1207
|
}
|
|
1171
1208
|
};
|
|
1172
1209
|
|
package/docs/dependencies.html
CHANGED
|
@@ -253,9 +253,9 @@
|
|
|
253
253
|
<li>
|
|
254
254
|
<b>@stackblitz/sdk</b> : 1.8.1</li>
|
|
255
255
|
<li>
|
|
256
|
-
<b>@eui/ecl</b> : 15.1.0-snapshot-
|
|
256
|
+
<b>@eui/ecl</b> : 15.1.0-snapshot-1674567426719</li>
|
|
257
257
|
<li>
|
|
258
|
-
<b>@eui/styles-base</b> : 15.1.0-snapshot-
|
|
258
|
+
<b>@eui/styles-base</b> : 15.1.0-snapshot-1674567426719</li>
|
|
259
259
|
<li>
|
|
260
260
|
<b>@eui/tools</b> : ^6.0.0</li>
|
|
261
261
|
</ul>
|