@okta/okta-auth-js 6.3.0 → 6.4.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 +40 -0
- package/README.md +6 -0
- package/cjs/AuthStateManager.js +1 -0
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +10 -11
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +3 -3
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/crypto/verifyToken.js +2 -1
- package/cjs/crypto/verifyToken.js.map +1 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/OAuthError.js +7 -1
- package/cjs/errors/OAuthError.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +17 -3
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/request.js +7 -3
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/idxState/index.js +55 -0
- package/cjs/idx/idxState/index.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/actionParser.js +1 -0
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/generateIdxAction.js +43 -30
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/idxResponseParser.js +8 -8
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/makeIdxState.js +3 -2
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/parsers.js +1 -0
- package/cjs/idx/idxState/v1/parsers.js.map +1 -0
- package/cjs/idx/{idx-js → idxState}/v1/remediationParser.js +4 -2
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -0
- package/cjs/idx/interact.js +42 -21
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +37 -12
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/remediate.js +57 -135
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +7 -6
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +12 -2
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/run.js +16 -12
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/types/idx-js.js +2 -0
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +0 -138
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/util.js +127 -5
- package/cjs/idx/util.js.map +1 -1
- package/cjs/server/serverStorage.js +1 -0
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/types/Token.js +0 -1
- package/cjs/types/Token.js.map +1 -1
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/types.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.umd.js +1 -1
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/esm.browser.js +711 -895
- package/esm/esm.browser.js.map +1 -1
- package/esm/esm.node.mjs +619 -740
- package/esm/esm.node.mjs.map +1 -1
- package/lib/TokenManager.d.ts +2 -2
- package/lib/errors/OAuthError.d.ts +2 -0
- package/lib/idx/flow/RemediationFlow.d.ts +2 -2
- package/lib/idx/idxState/index.d.ts +7 -0
- package/lib/idx/{idx-js → idxState}/v1/actionParser.d.ts +0 -0
- package/lib/idx/{idx-js → idxState}/v1/generateIdxAction.d.ts +3 -1
- package/lib/idx/{idx-js → idxState}/v1/idxResponseParser.d.ts +3 -2
- package/lib/idx/{idx-js → idxState}/v1/makeIdxState.d.ts +3 -2
- package/lib/idx/{idx-js → idxState}/v1/parsers.d.ts +0 -0
- package/lib/idx/{idx-js → idxState}/v1/remediationParser.d.ts +2 -1
- package/lib/idx/interact.d.ts +22 -0
- package/lib/idx/remediate.d.ts +9 -12
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +1 -2
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +3 -3
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +3 -4
- package/lib/idx/remediators/Base/Remediator.d.ts +8 -4
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +2 -3
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +3 -4
- package/lib/idx/remediators/ChallengeAuthenticator.d.ts +1 -2
- package/lib/idx/remediators/EnrollAuthenticator.d.ts +1 -2
- package/lib/idx/remediators/EnrollPoll.d.ts +1 -2
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -2
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +1 -2
- package/lib/idx/remediators/Identify.d.ts +1 -2
- package/lib/idx/remediators/ReEnrollAuthenticator.d.ts +1 -2
- package/lib/idx/remediators/ResetAuthenticator.d.ts +1 -2
- package/lib/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +1 -2
- package/lib/idx/remediators/SelectAuthenticatorEnroll.d.ts +1 -2
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +1 -2
- package/lib/idx/remediators/SelectEnrollProfile.d.ts +1 -2
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +1 -2
- package/lib/idx/remediators/Skip.d.ts +1 -2
- package/lib/idx/types/idx-js.d.ts +5 -2
- package/lib/idx/types/index.d.ts +26 -17
- package/lib/idx/util.d.ts +7 -4
- package/lib/types/EventEmitter.d.ts +3 -3
- package/lib/types/Service.d.ts +6 -6
- package/lib/types/Storage.d.ts +6 -6
- package/lib/types/TokenManager.d.ts +5 -2
- package/lib/types/UserClaims.d.ts +1 -1
- package/lib/util/types.d.ts +1 -1
- package/package.json +9 -10
- package/cjs/idx/headers.js +0 -59
- package/cjs/idx/headers.js.map +0 -1
- package/cjs/idx/idx-js/client.js +0 -91
- package/cjs/idx/idx-js/client.js.map +0 -1
- package/cjs/idx/idx-js/index.js +0 -40
- package/cjs/idx/idx-js/index.js.map +0 -1
- package/cjs/idx/idx-js/interact.js +0 -83
- package/cjs/idx/idx-js/interact.js.map +0 -1
- package/cjs/idx/idx-js/introspect.js +0 -62
- package/cjs/idx/idx-js/introspect.js.map +0 -1
- package/cjs/idx/idx-js/parsers.js +0 -41
- package/cjs/idx/idx-js/parsers.js.map +0 -1
- package/cjs/idx/idx-js/util.js +0 -34
- package/cjs/idx/idx-js/util.js.map +0 -1
- package/cjs/idx/idx-js/v1/actionParser.js.map +0 -1
- package/cjs/idx/idx-js/v1/generateIdxAction.js.map +0 -1
- package/cjs/idx/idx-js/v1/idxResponseParser.js.map +0 -1
- package/cjs/idx/idx-js/v1/makeIdxState.js.map +0 -1
- package/cjs/idx/idx-js/v1/parsers.js.map +0 -1
- package/cjs/idx/idx-js/v1/remediationParser.js.map +0 -1
- package/cjs/options.js +0 -170
- package/cjs/options.js.map +0 -1
- package/lib/idx/headers.d.ts +0 -16
- package/lib/idx/idx-js/client.d.ts +0 -36
- package/lib/idx/idx-js/index.d.ts +0 -35
- package/lib/idx/idx-js/interact.d.ts +0 -25
- package/lib/idx/idx-js/introspect.d.ts +0 -21
- package/lib/idx/idx-js/parsers.d.ts +0 -15
- package/lib/idx/idx-js/util.d.ts +0 -12
- package/lib/options.d.ts +0 -14
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../lib/idx/idx-js/v1/makeIdxState.ts"],"names":["makeIdxState","idxResponse","toPersist","requestDidSucceed","rawIdxResponse","remediations","context","actions","neededToProceed","proceed","remediationChoice","paramsFromUser","remediationChoiceObject","remediation","name","reject","action","findCode","item","interactionCode","successWithInteractionCode","value","rawIdxState"],"mappings":";;;;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKO,SAASA,YAAT,CAAuBC,WAAvB,EAAoDC,SAApD,EAA+DC,iBAA/D,EAAyG;AAAA;;AAC9G,QAAMC,cAAc,GAAIH,WAAxB;AACA,QAAM;AAAEI,IAAAA,YAAF;AAAgBC,IAAAA,OAAhB;AAAyBC,IAAAA;AAAzB,MAAqC,yCAAkBN,WAAlB,EAA+BC,SAA/B,CAA3C;AACA,QAAMM,eAAe,GAAG,CAAC,GAAGH,YAAJ,CAAxB;;AAEA,QAAMI,OAA+B,GAAG,gBAAgBC,iBAAhB,EAAmCC,cAAc,GAAG,EAApD,EAAyD;AAC/F;AACJ;AACA;AACA;AACA;AACA;AACI,UAAMC,uBAAuB,GAAG,mBAAAP,YAAY,MAAZ,CAAAA,YAAY,EAAOQ,WAAD,IAAiBA,WAAW,CAACC,IAAZ,KAAqBJ,iBAA5C,CAA5C;;AACA,QAAK,CAACE,uBAAN,EAAgC;AAC9B,aAAO,iBAAQG,MAAR,CAAgB,gCAA+BL,iBAAkB,GAAjE,CAAP;AACD;;AAED,WAAOE,uBAAuB,CAACI,MAAxB,CAA+BL,cAA/B,CAAP;AACD,GAbD;;AAeA,QAAMM,QAAQ,GAAGC,IAAI,IAAIA,IAAI,CAACJ,IAAL,KAAc,kBAAvC;;AACA,QAAMK,eAAe,4BAAGf,cAAc,CAACgB,0BAAlB,oFAAG,sBAA2CC,KAA9C,qFAAG,wEAAwDJ,QAAxD,CAAH,2DAAG,uBAAoEI,KAA5F;AAEA,SAAO;AACLZ,IAAAA,OADK;AAELD,IAAAA,eAFK;AAGLD,IAAAA,OAHK;AAILD,IAAAA,OAJK;AAKLgB,IAAAA,WAAW,EAAElB,cALR;AAMLe,IAAAA,eANK;AAOLjB,IAAAA,SAPK;AAQLC,IAAAA;AARK,GAAP;AAUD","sourcesContent":["/*!\n * Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { IdxResponse, RawIdxResponse } from '../../types/idx-js';\nimport { parseIdxResponse } from './idxResponseParser';\n\nexport function makeIdxState( idxResponse: RawIdxResponse, toPersist, requestDidSucceed: boolean ): IdxResponse {\n const rawIdxResponse = idxResponse;\n const { remediations, context, actions } = parseIdxResponse( idxResponse, toPersist );\n const neededToProceed = [...remediations];\n\n const proceed: IdxResponse['proceed'] = async function( remediationChoice, paramsFromUser = {} ) {\n /*\n remediationChoice is the name attribute on each form\n name should remain unique for items inside the remediation that are considered forms(identify, select-factor)\n name can be duplicate for items like redirect where its not considered a form(redirect)\n when names are not unique its a redirect to a href, so widget wont POST to idx-js layer.\n */\n const remediationChoiceObject = remediations.find((remediation) => remediation.name === remediationChoice);\n if ( !remediationChoiceObject ) {\n return Promise.reject(`Unknown remediation choice: [${remediationChoice}]`);\n }\n\n return remediationChoiceObject.action(paramsFromUser);\n };\n\n const findCode = item => item.name === 'interaction_code';\n const interactionCode = rawIdxResponse.successWithInteractionCode?.value?.find( findCode )?.value as string;\n\n return {\n proceed,\n neededToProceed,\n actions,\n context,\n rawIdxState: rawIdxResponse,\n interactionCode,\n toPersist,\n requestDidSucceed,\n };\n}\n"],"file":"makeIdxState.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../lib/idx/idx-js/v1/parsers.ts"],"names":["makeIdxState"],"mappings":";;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;eAGe;AACbA,EAAAA,YAAY,EAAZA;AADa,C","sourcesContent":["/*!\n * Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// @ts-nocheck\nimport { makeIdxState } from './makeIdxState';\n\nexport default {\n makeIdxState,\n};\n"],"file":"parsers.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../lib/idx/idx-js/v1/remediationParser.ts"],"names":["generateRemediationFunctions","remediationValue","toPersist","remediation","name"],"mappings":";;;;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGO,MAAMA,4BAA4B,GAAG,SAASA,4BAAT,CAAuCC,gBAAvC,EAAyDC,SAAS,GAAG,EAArE,EAA0E;AAEpH,SAAO,0BAAoB,kBAAAD,gBAAgB,MAAhB,CAAAA,gBAAgB,EAAME,WAAW,IAAI;AAC9D,WAAO,CACLA,WAAW,CAACC,IADP,EAEL,gCAAkBD,WAAlB,EAA+BD,SAA/B,CAFK,CAAP;AAID,GAL0C,CAApC,CAAP;AAMD,CARM","sourcesContent":["/*!\n * Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// @ts-nocheck\nimport generateIdxAction from './generateIdxAction';\n\nexport const generateRemediationFunctions = function generateRemediationFunctions( remediationValue, toPersist = {} ) {\n\n return Object.fromEntries( remediationValue.map( remediation => {\n return [\n remediation.name,\n generateIdxAction(remediation, toPersist),\n ];\n }) );\n};\n"],"file":"remediationParser.js"}
|
package/cjs/options.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.getDefaultOptions = getDefaultOptions;
|
|
6
|
-
exports.buildOptions = buildOptions;
|
|
7
|
-
|
|
8
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
9
|
-
|
|
10
|
-
var _util = require("./util");
|
|
11
|
-
|
|
12
|
-
var _builderUtil = require("./builderUtil");
|
|
13
|
-
|
|
14
|
-
var _fetchRequest = _interopRequireDefault(require("./fetch/fetchRequest"));
|
|
15
|
-
|
|
16
|
-
var _browserStorage = _interopRequireDefault(require("./browser/browserStorage"));
|
|
17
|
-
|
|
18
|
-
var _serverStorage = _interopRequireDefault(require("./server/serverStorage"));
|
|
19
|
-
|
|
20
|
-
var _features = require("./features");
|
|
21
|
-
|
|
22
|
-
/*!
|
|
23
|
-
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
24
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
25
|
-
*
|
|
26
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
27
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
28
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
29
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
30
|
-
*
|
|
31
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/* eslint-disable complexity */
|
|
35
|
-
const BROWSER_STORAGE = {
|
|
36
|
-
token: {
|
|
37
|
-
storageTypes: ['localStorage', 'sessionStorage', 'cookie']
|
|
38
|
-
},
|
|
39
|
-
cache: {
|
|
40
|
-
storageTypes: ['localStorage', 'sessionStorage', 'cookie']
|
|
41
|
-
},
|
|
42
|
-
transaction: {
|
|
43
|
-
storageTypes: ['sessionStorage', 'localStorage', 'cookie']
|
|
44
|
-
},
|
|
45
|
-
'shared-transaction': {
|
|
46
|
-
storageTypes: ['localStorage']
|
|
47
|
-
},
|
|
48
|
-
'original-uri': {
|
|
49
|
-
storageTypes: ['localStorage']
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const SERVER_STORAGE = {
|
|
53
|
-
token: {
|
|
54
|
-
storageTypes: ['memory']
|
|
55
|
-
},
|
|
56
|
-
cache: {
|
|
57
|
-
storageTypes: ['memory']
|
|
58
|
-
},
|
|
59
|
-
transaction: {
|
|
60
|
-
storageTypes: ['memory']
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
function getCookieSettings(args = {}, isHTTPS) {
|
|
65
|
-
// Secure cookies will be automatically used on a HTTPS connection
|
|
66
|
-
// Non-secure cookies will be automatically used on a HTTP connection
|
|
67
|
-
// secure option can override the automatic behavior
|
|
68
|
-
var cookieSettings = args.cookies || {};
|
|
69
|
-
|
|
70
|
-
if (typeof cookieSettings.secure === 'undefined') {
|
|
71
|
-
cookieSettings.secure = isHTTPS;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (typeof cookieSettings.sameSite === 'undefined') {
|
|
75
|
-
cookieSettings.sameSite = cookieSettings.secure ? 'none' : 'lax';
|
|
76
|
-
} // If secure=true, but the connection is not HTTPS, set secure=false.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (cookieSettings.secure && !isHTTPS) {
|
|
80
|
-
// eslint-disable-next-line no-console
|
|
81
|
-
(0, _util.warn)('The current page is not being served with the HTTPS protocol.\n' + 'For security reasons, we strongly recommend using HTTPS.\n' + 'If you cannot use HTTPS, set "cookies.secure" option to false.');
|
|
82
|
-
cookieSettings.secure = false;
|
|
83
|
-
} // Chrome >= 80 will block cookies with SameSite=None unless they are also Secure
|
|
84
|
-
// If sameSite=none, but the connection is not HTTPS, set sameSite=lax.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (cookieSettings.sameSite === 'none' && !cookieSettings.secure) {
|
|
88
|
-
cookieSettings.sameSite = 'lax';
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return cookieSettings;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function getDefaultOptions() {
|
|
95
|
-
let storageUtil;
|
|
96
|
-
|
|
97
|
-
if ((0, _features.isBrowser)()) {
|
|
98
|
-
storageUtil = (0, _assign.default)({}, _browserStorage.default, {
|
|
99
|
-
inMemoryStore: {} // create unique storage for this instance
|
|
100
|
-
|
|
101
|
-
});
|
|
102
|
-
} else {
|
|
103
|
-
storageUtil = _serverStorage.default;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const storageManager = (0, _features.isBrowser)() ? BROWSER_STORAGE : SERVER_STORAGE;
|
|
107
|
-
const enableSharedStorage = (0, _features.isBrowser)() ? true : false; // localStorage for multi-tab flows (browser only)
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
devMode: false,
|
|
111
|
-
httpRequestClient: _fetchRequest.default,
|
|
112
|
-
storageUtil,
|
|
113
|
-
storageManager,
|
|
114
|
-
transactionManager: {
|
|
115
|
-
enableSharedStorage
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function mergeOptions(options, args) {
|
|
121
|
-
return (0, _assign.default)({}, options, (0, _util.removeNils)(args), {
|
|
122
|
-
storageManager: (0, _assign.default)({}, options.storageManager, args.storageManager),
|
|
123
|
-
transactionManager: (0, _assign.default)({}, options.transactionManager, args.transactionManager)
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function buildOptions(args = {}) {
|
|
128
|
-
(0, _builderUtil.assertValidConfig)(args);
|
|
129
|
-
args = mergeOptions(getDefaultOptions(), args);
|
|
130
|
-
return (0, _util.removeNils)({
|
|
131
|
-
// OIDC configuration
|
|
132
|
-
issuer: (0, _util.removeTrailingSlash)(args.issuer),
|
|
133
|
-
tokenUrl: (0, _util.removeTrailingSlash)(args.tokenUrl),
|
|
134
|
-
authorizeUrl: (0, _util.removeTrailingSlash)(args.authorizeUrl),
|
|
135
|
-
userinfoUrl: (0, _util.removeTrailingSlash)(args.userinfoUrl),
|
|
136
|
-
revokeUrl: (0, _util.removeTrailingSlash)(args.revokeUrl),
|
|
137
|
-
logoutUrl: (0, _util.removeTrailingSlash)(args.logoutUrl),
|
|
138
|
-
clientId: args.clientId,
|
|
139
|
-
redirectUri: args.redirectUri,
|
|
140
|
-
state: args.state,
|
|
141
|
-
scopes: args.scopes,
|
|
142
|
-
postLogoutRedirectUri: args.postLogoutRedirectUri,
|
|
143
|
-
responseMode: args.responseMode,
|
|
144
|
-
responseType: args.responseType,
|
|
145
|
-
pkce: args.pkce === false ? false : true,
|
|
146
|
-
// PKCE defaults to true
|
|
147
|
-
useInteractionCodeFlow: args.useInteractionCodeFlow,
|
|
148
|
-
// Internal options
|
|
149
|
-
httpRequestClient: args.httpRequestClient,
|
|
150
|
-
transformErrorXHR: args.transformErrorXHR,
|
|
151
|
-
transformAuthState: args.transformAuthState,
|
|
152
|
-
restoreOriginalUri: args.restoreOriginalUri,
|
|
153
|
-
storageUtil: args.storageUtil,
|
|
154
|
-
headers: args.headers,
|
|
155
|
-
devMode: !!args.devMode,
|
|
156
|
-
storageManager: args.storageManager,
|
|
157
|
-
transactionManager: args.transactionManager,
|
|
158
|
-
cookies: (0, _features.isBrowser)() ? getCookieSettings(args, (0, _features.isHTTPS)()) : args.cookies,
|
|
159
|
-
flow: args.flow,
|
|
160
|
-
codeChallenge: args.codeChallenge,
|
|
161
|
-
codeChallengeMethod: args.codeChallengeMethod,
|
|
162
|
-
recoveryToken: args.recoveryToken,
|
|
163
|
-
activationToken: args.activationToken,
|
|
164
|
-
// Give the developer the ability to disable token signature validation.
|
|
165
|
-
ignoreSignature: !!args.ignoreSignature,
|
|
166
|
-
// Server-side web applications
|
|
167
|
-
clientSecret: args.clientSecret
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
//# sourceMappingURL=options.js.map
|
package/cjs/options.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../lib/options.ts"],"names":["BROWSER_STORAGE","token","storageTypes","cache","transaction","SERVER_STORAGE","getCookieSettings","args","isHTTPS","cookieSettings","cookies","secure","sameSite","getDefaultOptions","storageUtil","browserStorage","inMemoryStore","serverStorage","storageManager","enableSharedStorage","devMode","httpRequestClient","fetchRequest","transactionManager","mergeOptions","options","buildOptions","issuer","tokenUrl","authorizeUrl","userinfoUrl","revokeUrl","logoutUrl","clientId","redirectUri","state","scopes","postLogoutRedirectUri","responseMode","responseType","pkce","useInteractionCodeFlow","transformErrorXHR","transformAuthState","restoreOriginalUri","headers","flow","codeChallenge","codeChallengeMethod","recoveryToken","activationToken","ignoreSignature","clientSecret"],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n/* eslint-disable complexity */\nimport { removeTrailingSlash, warn, removeNils } from './util';\nimport { assertValidConfig } from './builderUtil';\nimport { OktaAuthOptions, StorageManagerOptions } from './types';\n\nimport fetchRequest from './fetch/fetchRequest';\nimport browserStorage from './browser/browserStorage';\nimport serverStorage from './server/serverStorage';\nimport { isBrowser, isHTTPS } from './features';\n\nconst BROWSER_STORAGE: StorageManagerOptions = {\n token: {\n storageTypes: [\n 'localStorage',\n 'sessionStorage',\n 'cookie'\n ]\n },\n cache: {\n storageTypes: [\n 'localStorage',\n 'sessionStorage',\n 'cookie'\n ]\n },\n transaction: {\n storageTypes: [\n 'sessionStorage',\n 'localStorage',\n 'cookie'\n ]\n },\n 'shared-transaction': {\n storageTypes: [\n 'localStorage'\n ]\n },\n 'original-uri': {\n storageTypes: [\n 'localStorage'\n ]\n }\n};\n\nconst SERVER_STORAGE: StorageManagerOptions = {\n token: {\n storageTypes: [\n 'memory'\n ]\n },\n cache: {\n storageTypes: [\n 'memory'\n ]\n },\n transaction: {\n storageTypes: [\n 'memory'\n ]\n }\n};\n\nfunction getCookieSettings(args: OktaAuthOptions = {}, isHTTPS: boolean) {\n // Secure cookies will be automatically used on a HTTPS connection\n // Non-secure cookies will be automatically used on a HTTP connection\n // secure option can override the automatic behavior\n var cookieSettings = args.cookies || {};\n if (typeof cookieSettings.secure === 'undefined') {\n cookieSettings.secure = isHTTPS;\n }\n if (typeof cookieSettings.sameSite === 'undefined') {\n cookieSettings.sameSite = cookieSettings.secure ? 'none' : 'lax';\n }\n\n // If secure=true, but the connection is not HTTPS, set secure=false.\n if (cookieSettings.secure && !isHTTPS) {\n // eslint-disable-next-line no-console\n warn(\n 'The current page is not being served with the HTTPS protocol.\\n' +\n 'For security reasons, we strongly recommend using HTTPS.\\n' +\n 'If you cannot use HTTPS, set \"cookies.secure\" option to false.'\n );\n cookieSettings.secure = false;\n }\n\n // Chrome >= 80 will block cookies with SameSite=None unless they are also Secure\n // If sameSite=none, but the connection is not HTTPS, set sameSite=lax.\n if (cookieSettings.sameSite === 'none' && !cookieSettings.secure) {\n cookieSettings.sameSite = 'lax';\n }\n\n return cookieSettings;\n}\n\n\nexport function getDefaultOptions(): OktaAuthOptions {\n let storageUtil;\n if (isBrowser()) {\n storageUtil = Object.assign({}, browserStorage, {\n inMemoryStore: {} // create unique storage for this instance\n });\n } else {\n storageUtil = serverStorage;\n }\n const storageManager = isBrowser() ? BROWSER_STORAGE : SERVER_STORAGE;\n const enableSharedStorage = isBrowser() ? true : false; // localStorage for multi-tab flows (browser only)\n return {\n devMode: false,\n httpRequestClient: fetchRequest,\n storageUtil,\n storageManager,\n transactionManager: {\n enableSharedStorage\n }\n };\n}\n\nfunction mergeOptions(options, args): OktaAuthOptions {\n return Object.assign({}, options, removeNils(args), {\n storageManager: Object.assign({}, options.storageManager, args.storageManager),\n transactionManager: Object.assign({}, options.transactionManager, args.transactionManager),\n });\n}\n\nexport function buildOptions(args: OktaAuthOptions = {}): OktaAuthOptions {\n assertValidConfig(args);\n args = mergeOptions(getDefaultOptions(), args);\n return removeNils({\n // OIDC configuration\n issuer: removeTrailingSlash(args.issuer),\n tokenUrl: removeTrailingSlash(args.tokenUrl),\n authorizeUrl: removeTrailingSlash(args.authorizeUrl),\n userinfoUrl: removeTrailingSlash(args.userinfoUrl),\n revokeUrl: removeTrailingSlash(args.revokeUrl),\n logoutUrl: removeTrailingSlash(args.logoutUrl),\n clientId: args.clientId,\n redirectUri: args.redirectUri,\n state: args.state,\n scopes: args.scopes,\n postLogoutRedirectUri: args.postLogoutRedirectUri,\n responseMode: args.responseMode,\n responseType: args.responseType,\n pkce: args.pkce === false ? false : true, // PKCE defaults to true\n useInteractionCodeFlow: args.useInteractionCodeFlow,\n\n // Internal options\n httpRequestClient: args.httpRequestClient,\n transformErrorXHR: args.transformErrorXHR,\n transformAuthState: args.transformAuthState,\n restoreOriginalUri: args.restoreOriginalUri,\n storageUtil: args.storageUtil,\n headers: args.headers,\n devMode: !!args.devMode,\n storageManager: args.storageManager,\n transactionManager: args.transactionManager,\n cookies: isBrowser() ? getCookieSettings(args, isHTTPS()) : args.cookies,\n flow: args.flow,\n codeChallenge: args.codeChallenge,\n codeChallengeMethod: args.codeChallengeMethod,\n recoveryToken: args.recoveryToken,\n activationToken: args.activationToken,\n \n // Give the developer the ability to disable token signature validation.\n ignoreSignature: !!args.ignoreSignature,\n\n // Server-side web applications\n clientSecret: args.clientSecret\n });\n}\n"],"file":"options.js"}
|
package/lib/idx/headers.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
import { OktaAuthInterface } from '../types';
|
|
14
|
-
export declare function setGlobalRequestInterceptor(fn: any): void;
|
|
15
|
-
export declare function clearGlobalRequestInterceptor(): void;
|
|
16
|
-
export declare function createGlobalRequestInterceptor(sdk: OktaAuthInterface): (requestConfig: any) => void;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Reusable interceptor interface
|
|
14
|
-
*/
|
|
15
|
-
export declare class Interceptor {
|
|
16
|
-
handlers: never[];
|
|
17
|
-
use(before: any): void;
|
|
18
|
-
clear(): void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Singleton instance of the IdX HTTP Client
|
|
22
|
-
*
|
|
23
|
-
* Invoke the `use` method to add a new interceptor:
|
|
24
|
-
* - client.interceptors.request.use((requestConfig) => { some logic });
|
|
25
|
-
*/
|
|
26
|
-
export declare const HttpClient: {
|
|
27
|
-
interceptors: {
|
|
28
|
-
request: Interceptor;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export declare const request: (target: any, { method, headers, credentials, body }: {
|
|
32
|
-
method?: string | undefined;
|
|
33
|
-
headers?: {} | undefined;
|
|
34
|
-
credentials?: string | undefined;
|
|
35
|
-
body: any;
|
|
36
|
-
}) => Promise<Response>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
declare const _default: {
|
|
13
|
-
introspect: ({ withCredentials, domain, interactionHandle, stateHandle, version, }: import("./introspect").IntrospectOptions) => Promise<import("../..").RawIdxResponse>;
|
|
14
|
-
interact: ({ withCredentials, clientId, baseUrl, scopes, redirectUri, codeChallenge, codeChallengeMethod, state, activationToken, recoveryToken, clientSecret, }: {
|
|
15
|
-
withCredentials: any;
|
|
16
|
-
clientId: any;
|
|
17
|
-
baseUrl: any;
|
|
18
|
-
scopes?: string[] | undefined;
|
|
19
|
-
redirectUri: any;
|
|
20
|
-
codeChallenge: any;
|
|
21
|
-
codeChallengeMethod: any;
|
|
22
|
-
state: any;
|
|
23
|
-
activationToken: any;
|
|
24
|
-
recoveryToken: any;
|
|
25
|
-
clientSecret: any;
|
|
26
|
-
}) => Promise<any>;
|
|
27
|
-
makeIdxState: typeof import("./v1/makeIdxState").makeIdxState;
|
|
28
|
-
client: {
|
|
29
|
-
interceptors: {
|
|
30
|
-
request: import("./client").Interceptor;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
LATEST_SUPPORTED_IDX_API_VERSION: string;
|
|
34
|
-
};
|
|
35
|
-
export default _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
declare const interact: ({ withCredentials, clientId, baseUrl, scopes, redirectUri, codeChallenge, codeChallengeMethod, state, activationToken, recoveryToken, clientSecret, }: {
|
|
13
|
-
withCredentials: any;
|
|
14
|
-
clientId: any;
|
|
15
|
-
baseUrl: any;
|
|
16
|
-
scopes?: string[] | undefined;
|
|
17
|
-
redirectUri: any;
|
|
18
|
-
codeChallenge: any;
|
|
19
|
-
codeChallengeMethod: any;
|
|
20
|
-
state: any;
|
|
21
|
-
activationToken: any;
|
|
22
|
-
recoveryToken: any;
|
|
23
|
-
clientSecret: any;
|
|
24
|
-
}) => Promise<any>;
|
|
25
|
-
export default interact;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { RawIdxResponse } from '../types';
|
|
13
|
-
export interface IntrospectOptions {
|
|
14
|
-
domain: string;
|
|
15
|
-
withCredentials?: boolean;
|
|
16
|
-
interactionHandle?: string;
|
|
17
|
-
stateHandle?: string;
|
|
18
|
-
version?: string;
|
|
19
|
-
}
|
|
20
|
-
declare const introspect: ({ withCredentials, domain, interactionHandle, stateHandle, version, }: IntrospectOptions) => Promise<RawIdxResponse>;
|
|
21
|
-
export default introspect;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
declare const parsersForVersion: (version: any) => {
|
|
13
|
-
makeIdxState: typeof import("./v1/makeIdxState").makeIdxState;
|
|
14
|
-
};
|
|
15
|
-
export default parsersForVersion;
|
package/lib/idx/idx-js/util.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export declare function validateVersionConfig(version: any): void;
|
package/lib/options.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { OktaAuthOptions } from './types';
|
|
13
|
-
export declare function getDefaultOptions(): OktaAuthOptions;
|
|
14
|
-
export declare function buildOptions(args?: OktaAuthOptions): OktaAuthOptions;
|