@schibsted/account-sdk-browser 4.5.0 → 4.6.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.
- package/CHANGELOG.md +20 -0
- package/README.md +3 -1
- package/es5/global.js +41 -4
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +40 -4
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +41 -4
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/payment.js +1 -0
- package/es5/payment.js.map +1 -1
- package/es5/payment.min.js.map +1 -1
- package/identity.d.ts +1 -0
- package/index.d.ts +1 -0
- package/monetization.d.ts +1 -0
- package/package.json +1 -1
- package/payment.d.ts +1 -0
- package/src/identity.d.ts +73 -3
- package/src/identity.js +38 -3
- package/src/payment.d.ts +1 -0
- package/src/payment.js +1 -0
package/es5/index.js
CHANGED
|
@@ -971,6 +971,42 @@ var _require = __webpack_require__(174),
|
|
|
971
971
|
* the request and callback. It's also recommended to prevent CSRF {@link https://tools.ietf.org/html/rfc6749#section-10.12}
|
|
972
972
|
* @property {string} [acrValues] - Authentication Context Class Reference Values. If
|
|
973
973
|
* omitted, the user will be asked to authenticate using username+password.
|
|
974
|
+
* For 2FA (Two-Factor Authentication) possible values are `sms`, `otp` (one time password),
|
|
975
|
+
* `password` (will force password confirmation, even if user is already logged in), `eid`. Those values might
|
|
976
|
+
* be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
|
|
977
|
+
* to verify AMR (Authentication Methods References) claim in ID token.
|
|
978
|
+
* Might also be used to ensure additional acr (sms, otp) for already logged in users.
|
|
979
|
+
* Supported values are also 'otp-email' means one time password using email, and 'otp-sms' means
|
|
980
|
+
* one time password using sms.
|
|
981
|
+
* @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
|
|
982
|
+
* scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
|
|
983
|
+
* includes the id token which can be useful for getting information about the user. Omitting
|
|
984
|
+
* scope is allowed, while `invalid_scope` is returned when the client asks for a scope you
|
|
985
|
+
* aren’t allowed to request. {@link https://tools.ietf.org/html/rfc6749#section-3.3}
|
|
986
|
+
* @property {string} [redirectUri] - Redirect uri that will receive the
|
|
987
|
+
* code. Must exactly match a redirectUri from your client in self-service
|
|
988
|
+
* @property {boolean} [preferPopup] - Should we try to open a popup window?
|
|
989
|
+
* @property {string} [loginHint] - user email or UUID hint
|
|
990
|
+
* @property {string} [tag] - Pulse tag
|
|
991
|
+
* @property {string} [teaser] - Teaser slug. Teaser with given slug will be displayed
|
|
992
|
+
* in place of default teaser
|
|
993
|
+
* @property {number|string} [maxAge] - Specifies the allowable elapsed time in seconds since
|
|
994
|
+
* the last time the End-User was actively authenticated. If last authentication time is more
|
|
995
|
+
* than maxAge seconds in the past, re-authentication will be required. See the OpenID Connect
|
|
996
|
+
* spec section 3.1.2.1 for more information
|
|
997
|
+
* @property {string} [locale] - Optional parameter to overwrite client locale setting.
|
|
998
|
+
* New flows supports nb_NO, fi_FI, sv_SE, en_US
|
|
999
|
+
* @property {boolean} [oneStepLogin] - display username and password on one screen
|
|
1000
|
+
* @property {string} [prompt] - String that specifies whether the Authorization Server prompts the
|
|
1001
|
+
* End-User for reauthentication or confirm account screen. Supported values: `select_account` or `login`
|
|
1002
|
+
*/
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* @typedef {object} SimplifiedLoginWidgetLoginOptions
|
|
1006
|
+
* @property {string|function(): (string|Promise<string>)} state - An opaque value used by the client to maintain state between
|
|
1007
|
+
* the request and callback. It's also recommended to prevent CSRF {@link https://tools.ietf.org/html/rfc6749#section-10.12}
|
|
1008
|
+
* @property {string} [acrValues] - Authentication Context Class Reference Values. If
|
|
1009
|
+
* omitted, the user will be asked to authenticate using username+password.
|
|
974
1010
|
* For 2FA (Two-Factor Authentication) possible values are `sms`, `otp` (one time password) and
|
|
975
1011
|
* `password` (will force password confirmation, even if user is already logged in). Those values might
|
|
976
1012
|
* be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
|
|
@@ -997,7 +1033,7 @@ var _require = __webpack_require__(174),
|
|
|
997
1033
|
* @property {string} [locale] - Optional parameter to overwrite client locale setting.
|
|
998
1034
|
* New flows supports nb_NO, fi_FI, sv_SE, en_US
|
|
999
1035
|
* @property {boolean} [oneStepLogin] - display username and password on one screen
|
|
1000
|
-
* @property {string} [prompt] - String that specifies whether the Authorization Server prompts the
|
|
1036
|
+
* @property {string} [prompt] - String that specifies whether the Authorization Server prompts the
|
|
1001
1037
|
* End-User for reauthentication or confirm account screen. Supported values: `select_account` or `login`
|
|
1002
1038
|
*/
|
|
1003
1039
|
|
|
@@ -2057,7 +2093,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2057
2093
|
}
|
|
2058
2094
|
|
|
2059
2095
|
var isValidAcrValue = function isValidAcrValue(acrValue) {
|
|
2060
|
-
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms'], true);
|
|
2096
|
+
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms', 'eid-no', 'eid-se', 'eid'], true);
|
|
2061
2097
|
};
|
|
2062
2098
|
|
|
2063
2099
|
Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(!acrValues || Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValues, ['', 'otp-email', 'otp-sms'], true) || acrValues.split(' ').every(isValidAcrValue), "The acrValues parameter is not acceptable: ".concat(acrValues));
|
|
@@ -2130,7 +2166,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2130
2166
|
* and store that info in localStorage. Widget will be display only if user is logged in to SSO.
|
|
2131
2167
|
*
|
|
2132
2168
|
* @async
|
|
2133
|
-
* @param {
|
|
2169
|
+
* @param {SimplifiedLoginWidgetLoginOptions} loginParams - the same as `options` param for login function. Login will be called on user
|
|
2134
2170
|
* continue action. `state` might be string or async function.
|
|
2135
2171
|
* @param {SimplifiedLoginWidgetOptions} [options] - additional configuration of Simplified Login Widget
|
|
2136
2172
|
* @return {Promise<boolean|SDKError>} - will resolve to true if widget will be display. Otherwise will throw SDKError
|
|
@@ -11484,7 +11520,7 @@ function emulate(global) {
|
|
|
11484
11520
|
/* 174 */
|
|
11485
11521
|
/***/ (function(module) {
|
|
11486
11522
|
|
|
11487
|
-
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.
|
|
11523
|
+
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.6.0\",\"description\":\"Schibsted account SDK for browsers\",\"main\":\"index.js\",\"scripts\":{\"build\":\"./build.sh\",\"clean\":\"rimraf .cache coverage dist docs\",\"docs\":\"rimraf docs && jsdoc -c ./utils/jsdoc.js --verbose\",\"lint\":\"eslint .\",\"pretest\":\"npm run lint\",\"test\":\"jest\",\"precover\":\"npm run lint\",\"cover\":\"jest --coverage\",\"postcover\":\"codecov\"},\"author\":\"\",\"license\":\"MIT\",\"dependencies\":{\"tiny-emitter\":\"^2.1.0\"},\"devDependencies\":{\"@babel/core\":\"^7.11.4\",\"@babel/preset-env\":\"^7.11.0\",\"babel-loader\":\"^8.1.0\",\"codecov\":\"^3.6.5\",\"core-js\":\"^3.6.5\",\"docdash\":\"git+https://github.com/torarvid/docdash.git#v0.5.0\",\"eslint\":\"^6.8.0\",\"eslint-plugin-import\":\"^2.20.2\",\"jest\":\"^26.4.2\",\"jest-junit\":\"^10.0.0\",\"jsdoc\":\"^3.6.5\",\"node-fetch\":\"^2.6.0\",\"regenerator-runtime\":\"^0.13.7\",\"webpack\":\"^4.44.1\",\"webpack-cli\":\"^3.3.12\",\"whatwg-url\":\"^8.0.0\"},\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/schibsted/account-sdk-browser.git\"},\"babel\":{\"presets\":[[\"@babel/preset-env\",{\"useBuiltIns\":\"usage\",\"corejs\":3,\"targets\":{\"browsers\":[\"> 1%\",\"last 10 chrome major versions\",\"last 10 firefox major versions\",\"last 10 opera major versions\",\"last 2 safari major versions\",\"last 2 ios major versions\",\"last 2 ie major versions\",\"last 5 edge major versions\"]}}]]},\"typings\":\"index.d.ts\"}");
|
|
11488
11524
|
|
|
11489
11525
|
/***/ }),
|
|
11490
11526
|
/* 175 */
|
|
@@ -12103,6 +12139,7 @@ var Payment = /*#__PURE__*/function () {
|
|
|
12103
12139
|
});
|
|
12104
12140
|
}
|
|
12105
12141
|
/**
|
|
12142
|
+
* @deprecated
|
|
12106
12143
|
* Get the url for flow to purchase a promo code product with ZUORA
|
|
12107
12144
|
* @param {string} code - promocode product code
|
|
12108
12145
|
* @param {string} [state=''] - An opaque value used by the client to maintain state between
|