@schibsted/account-sdk-browser 5.2.1 → 5.2.3

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.
package/es5/index.js CHANGED
@@ -988,7 +988,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
988
988
  * `password` (will force password confirmation, even if user is already logged in), `eid`. Those values might
989
989
  * be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
990
990
  * to verify AMR (Authentication Methods References) claim in ID token.
991
- * Might also be used to ensure additional acr (sms, otp) for already logged in users.
991
+ * Might also be used to ensure additional acr (sms, otp) for already logged-in users.
992
992
  * Supported value is also 'otp-email' means one time password using email.
993
993
  * @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
994
994
  * scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
@@ -998,7 +998,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
998
998
  * @property {string} [redirectUri] - Redirect uri that will receive the
999
999
  * code. Must exactly match a redirectUri from your client in self-service
1000
1000
  * @property {boolean} [preferPopup] - Should we try to open a popup window?
1001
- * @property {string} [loginHint] - user email or UUID hint
1001
+ * @property {string} [loginHint] - User email or UUID hint
1002
1002
  * @property {string} [tag] - Pulse tag
1003
1003
  * @property {string} [teaser] - Teaser slug. Teaser with given slug will be displayed
1004
1004
  * in place of default teaser
@@ -1008,9 +1008,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1008
1008
  * spec section 3.1.2.1 for more information
1009
1009
  * @property {string} [locale] - Optional parameter to overwrite client locale setting.
1010
1010
  * New flows supports nb_NO, fi_FI, sv_SE, en_US
1011
- * @property {boolean} [oneStepLogin] - display username and password on one screen
1011
+ * @property {boolean} [oneStepLogin] - Display username and password on one screen
1012
1012
  * @property {string} [prompt] - String that specifies whether the Authorization Server prompts the
1013
- * End-User for reauthentication or confirm account screen. Supported values: `select_account` or `login`
1013
+ * End-User for re-authentication or confirm account screen. Supported values: `select_account` or `login`
1014
+ * @property {string} [xDomainId] - Identifier for cross-domain tracking in Pulse
1015
+ * @property {string} [xEnvironmentId] - Environment for cross-domain tracking in Pulse
1016
+ * @property {string} [originCampaign] - Campaign identifier for tracking in Pulse
1014
1017
  */
1015
1018
  /**
1016
1019
  * @typedef {object} SimplifiedLoginWidgetLoginOptions
@@ -1022,7 +1025,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1022
1025
  * `password` (will force password confirmation, even if user is already logged in). Those values might
1023
1026
  * be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
1024
1027
  * to verify AMR (Authentication Methods References) claim in ID token.
1025
- * Might also be used to ensure additional acr (sms, otp) for already logged in users.
1028
+ * Might also be used to ensure additional acr (sms, otp) for already logged-in users.
1026
1029
  * Supported value is also 'otp-email' means one time password using email.
1027
1030
  * @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
1028
1031
  * scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
@@ -1032,7 +1035,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1032
1035
  * @property {string} [redirectUri] - Redirect uri that will receive the
1033
1036
  * code. Must exactly match a redirectUri from your client in self-service
1034
1037
  * @property {boolean} [preferPopup] - Should we try to open a popup window?
1035
- * @property {string} [loginHint] - user email or UUID hint
1038
+ * @property {string} [loginHint] - User email or UUID hint
1036
1039
  * @property {string} [tag] - Pulse tag
1037
1040
  * @property {string} [teaser] - Teaser slug. Teaser with given slug will be displayed
1038
1041
  * in place of default teaser
@@ -1042,9 +1045,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1042
1045
  * spec section 3.1.2.1 for more information
1043
1046
  * @property {string} [locale] - Optional parameter to overwrite client locale setting.
1044
1047
  * New flows supports nb_NO, fi_FI, sv_SE, en_US
1045
- * @property {boolean} [oneStepLogin] - display username and password on one screen
1048
+ * @property {boolean} [oneStepLogin] - Display username and password on one screen
1046
1049
  * @property {string} [prompt] - String that specifies whether the Authorization Server prompts the
1047
1050
  * End-User for reauthentication or confirm account screen. Supported values: `select_account` or `login`
1051
+ * @property {string} [xDomainId] - Identifier for cross-domain tracking in Pulse
1052
+ * @property {string} [xEnvironmentId] - Environment for cross-domain tracking in Pulse
1053
+ * @property {string} [originCampaign] - Campaign identifier for tracking in Pulse
1048
1054
  */
1049
1055
 
1050
1056
  /**
@@ -1174,7 +1180,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
1174
1180
  // Old session
1175
1181
  _this._session = {};
1176
1182
  _this._setSessionServiceUrl(sessionDomain);
1177
- _this._usedSessionServiceGetSessionEndpoint = _this._sessionService.url.pathname && _this._sessionService.url.pathname.length <= 1 ? 'session' : 'v2/session';
1183
+ _this._usedSessionServiceGetSessionEndpoint = _this._sessionService.url.pathname && _this._sessionService.url.pathname.length <= 1 ? 'v2/session' : 'session';
1178
1184
  _this._setSpidServerUrl(env);
1179
1185
  _this._setBffServerUrl(env);
1180
1186
  _this._setOauthServerUrl(env);
@@ -2063,6 +2069,8 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2063
2069
  * @param {boolean} [options.oneStepLogin=false]
2064
2070
  * @param {string} [options.prompt=select_account]
2065
2071
  * @param {string} [options.xDomainId]
2072
+ * @param {string} [options.xEnvironmentId]
2073
+ * @param {string} [options.originCampaign]
2066
2074
  * @return {Window|null} - Reference to popup window if created (or `null` otherwise)
2067
2075
  */
2068
2076
  }, {
@@ -2092,7 +2100,11 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2092
2100
  _ref4$prompt = _ref4.prompt,
2093
2101
  prompt = _ref4$prompt === void 0 ? 'select_account' : _ref4$prompt,
2094
2102
  _ref4$xDomainId = _ref4.xDomainId,
2095
- xDomainId = _ref4$xDomainId === void 0 ? '' : _ref4$xDomainId;
2103
+ xDomainId = _ref4$xDomainId === void 0 ? '' : _ref4$xDomainId,
2104
+ _ref4$xEnvironmentId = _ref4.xEnvironmentId,
2105
+ xEnvironmentId = _ref4$xEnvironmentId === void 0 ? '' : _ref4$xEnvironmentId,
2106
+ _ref4$originCampaign = _ref4.originCampaign,
2107
+ originCampaign = _ref4$originCampaign === void 0 ? '' : _ref4$originCampaign;
2096
2108
  this._closePopup();
2097
2109
  this.sessionStorageCache.delete(HAS_SESSION_CACHE_KEY);
2098
2110
  var url = this.loginUrl({
@@ -2107,7 +2119,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2107
2119
  locale: locale,
2108
2120
  oneStepLogin: oneStepLogin,
2109
2121
  prompt: prompt,
2110
- xDomainId: xDomainId
2122
+ xDomainId: xDomainId,
2123
+ xEnvironmentId: xEnvironmentId,
2124
+ originCampaign: originCampaign
2111
2125
  });
2112
2126
  if (preferPopup) {
2113
2127
  this.popup = _popup_js__WEBPACK_IMPORTED_MODULE_61__["open"](this.window, url, 'Schibsted account', {
@@ -2188,6 +2202,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2188
2202
  * @param {string} [options.locale]
2189
2203
  * @param {boolean} [options.oneStepLogin=false]
2190
2204
  * @param {string} [options.prompt=select_account]
2205
+ * @param {string} [options.xDomainId]
2206
+ * @param {string} [options.xEnvironmentId]
2207
+ * @param {string} [options.originCampaign]
2191
2208
  * @return {string} - The url
2192
2209
  */
2193
2210
  }, {
@@ -2215,7 +2232,11 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2215
2232
  _ref5$prompt = _ref5.prompt,
2216
2233
  prompt = _ref5$prompt === void 0 ? 'select_account' : _ref5$prompt,
2217
2234
  _ref5$xDomainId = _ref5.xDomainId,
2218
- xDomainId = _ref5$xDomainId === void 0 ? '' : _ref5$xDomainId;
2235
+ xDomainId = _ref5$xDomainId === void 0 ? '' : _ref5$xDomainId,
2236
+ _ref5$xEnvironmentId = _ref5.xEnvironmentId,
2237
+ xEnvironmentId = _ref5$xEnvironmentId === void 0 ? '' : _ref5$xEnvironmentId,
2238
+ _ref5$originCampaign = _ref5.originCampaign,
2239
+ originCampaign = _ref5$originCampaign === void 0 ? '' : _ref5$originCampaign;
2219
2240
  if (_typeof(arguments[0]) !== 'object') {
2220
2241
  // backward compatibility
2221
2242
  state = arguments[0];
@@ -2246,7 +2267,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2246
2267
  locale: locale,
2247
2268
  one_step_login: oneStepLogin || '',
2248
2269
  prompt: acrValues ? '' : prompt,
2249
- x_domain_id: xDomainId
2270
+ x_domain_id: xDomainId,
2271
+ x_env_id: xEnvironmentId,
2272
+ utm_campaign: originCampaign
2250
2273
  });
2251
2274
  }
2252
2275
 
@@ -12149,7 +12172,7 @@ __webpack_require__.r(__webpack_exports__);
12149
12172
 
12150
12173
 
12151
12174
 
12152
- var version = '5.2.1';
12175
+ var version = '5.2.3';
12153
12176
  /* harmony default export */ __webpack_exports__["default"] = (version);
12154
12177
 
12155
12178
  /***/ }),