oidc-spa 7.1.10 → 7.2.0-rc.2
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/backend.js +235 -352
- package/backend.js.map +1 -1
- package/core/AuthResponse.js +12 -49
- package/core/AuthResponse.js.map +1 -1
- package/core/Oidc.d.ts +1 -2
- package/core/Oidc.js.map +1 -1
- package/core/OidcInitializationError.d.ts +0 -13
- package/core/OidcInitializationError.js +8 -318
- package/core/OidcInitializationError.js.map +1 -1
- package/core/OidcMetadata.js +1 -1
- package/core/OidcMetadata.js.map +1 -1
- package/core/StateData.d.ts +5 -5
- package/core/StateData.js +25 -25
- package/core/StateData.js.map +1 -1
- package/core/configId.js +1 -1
- package/core/configId.js.map +1 -1
- package/core/createOidc.d.ts +8 -0
- package/core/createOidc.js +1030 -1292
- package/core/createOidc.js.map +1 -1
- package/core/diagnostic.d.ts +14 -0
- package/core/diagnostic.js +214 -0
- package/core/diagnostic.js.map +1 -0
- package/core/evtIsUserActive.js +26 -27
- package/core/evtIsUserActive.js.map +1 -1
- package/core/handleOidcCallback.js +99 -154
- package/core/handleOidcCallback.js.map +1 -1
- package/core/iframeMessageProtection.d.ts +1 -1
- package/core/iframeMessageProtection.js +40 -106
- package/core/iframeMessageProtection.js.map +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.js +3 -3
- package/core/index.js.map +1 -1
- package/core/initialLocationHref.js +1 -1
- package/core/initialLocationHref.js.map +1 -1
- package/core/isNewBrowserSession.js +8 -8
- package/core/isNewBrowserSession.js.map +1 -1
- package/core/loginOrGoToAuthServer.d.ts +1 -1
- package/core/loginOrGoToAuthServer.js +188 -310
- package/core/loginOrGoToAuthServer.js.map +1 -1
- package/core/loginPropagationToOtherTabs.js +15 -16
- package/core/loginPropagationToOtherTabs.js.map +1 -1
- package/core/loginSilent.d.ts +2 -3
- package/core/loginSilent.js +118 -214
- package/core/loginSilent.js.map +1 -1
- package/core/logoutPropagationToOtherTabs.js +15 -16
- package/core/logoutPropagationToOtherTabs.js.map +1 -1
- package/core/oidcClientTsUserToTokens.d.ts +1 -1
- package/core/oidcClientTsUserToTokens.js +75 -72
- package/core/oidcClientTsUserToTokens.js.map +1 -1
- package/core/ongoingLoginOrRefreshProcesses.js +23 -89
- package/core/ongoingLoginOrRefreshProcesses.js.map +1 -1
- package/core/persistedAuthState.js +13 -13
- package/core/persistedAuthState.js.map +1 -1
- package/entrypoint.js +9 -9
- package/entrypoint.js.map +1 -1
- package/esm/core/AuthResponse.d.ts +5 -0
- package/{src/core/AuthResponse.ts → esm/core/AuthResponse.js} +3 -9
- package/esm/core/AuthResponse.js.map +1 -0
- package/esm/core/Oidc.d.ts +126 -0
- package/esm/core/Oidc.js +2 -0
- package/esm/core/Oidc.js.map +1 -0
- package/esm/core/OidcInitializationError.d.ts +7 -0
- package/esm/core/OidcInitializationError.js +17 -0
- package/esm/core/OidcInitializationError.js.map +1 -0
- package/{src/core/OidcMetadata.ts → esm/core/OidcMetadata.d.ts} +0 -5
- package/esm/core/OidcMetadata.js +3 -0
- package/esm/core/OidcMetadata.js.map +1 -0
- package/esm/core/StateData.d.ts +42 -0
- package/esm/core/StateData.js +55 -0
- package/esm/core/StateData.js.map +1 -0
- package/esm/core/configId.d.ts +4 -0
- package/esm/core/configId.js +4 -0
- package/esm/core/configId.js.map +1 -0
- package/esm/core/createOidc.d.ts +132 -0
- package/{src/core/createOidc.ts → esm/core/createOidc.js} +282 -826
- package/esm/core/createOidc.js.map +1 -0
- package/esm/core/diagnostic.d.ts +14 -0
- package/{src/core/OidcInitializationError.ts → esm/core/diagnostic.js} +40 -117
- package/esm/core/diagnostic.js.map +1 -0
- package/esm/core/evtIsUserActive.d.ts +5 -0
- package/{src/core/evtIsUserActive.ts → esm/core/evtIsUserActive.js} +14 -46
- package/esm/core/evtIsUserActive.js.map +1 -0
- package/esm/core/handleOidcCallback.d.ts +13 -0
- package/{src/core/handleOidcCallback.ts → esm/core/handleOidcCallback.js} +56 -131
- package/esm/core/handleOidcCallback.js.map +1 -0
- package/esm/core/iframeMessageProtection.d.ts +20 -0
- package/{src/core/iframeMessageProtection.ts → esm/core/iframeMessageProtection.js} +14 -49
- package/esm/core/iframeMessageProtection.js.map +1 -0
- package/{src/core/index.ts → esm/core/index.d.ts} +1 -1
- package/esm/core/index.js +4 -0
- package/esm/core/index.js.map +1 -0
- package/esm/core/initialLocationHref.d.ts +1 -0
- package/{src/core/initialLocationHref.ts → esm/core/initialLocationHref.js} +1 -1
- package/esm/core/initialLocationHref.js.map +1 -0
- package/esm/core/isNewBrowserSession.d.ts +9 -0
- package/{src/core/isNewBrowserSession.ts → esm/core/isNewBrowserSession.js} +3 -15
- package/esm/core/isNewBrowserSession.js.map +1 -0
- package/esm/core/loginOrGoToAuthServer.d.ts +40 -0
- package/{src/core/loginOrGoToAuthServer.ts → esm/core/loginOrGoToAuthServer.js} +60 -168
- package/esm/core/loginOrGoToAuthServer.js.map +1 -0
- package/esm/core/loginPropagationToOtherTabs.d.ts +8 -0
- package/{src/core/loginPropagationToOtherTabs.ts → esm/core/loginPropagationToOtherTabs.js} +7 -25
- package/esm/core/loginPropagationToOtherTabs.js.map +1 -0
- package/esm/core/loginSilent.d.ts +28 -0
- package/esm/core/loginSilent.js +125 -0
- package/esm/core/loginSilent.js.map +1 -0
- package/esm/core/logoutPropagationToOtherTabs.d.ts +10 -0
- package/{src/core/logoutPropagationToOtherTabs.ts → esm/core/logoutPropagationToOtherTabs.js} +8 -28
- package/esm/core/logoutPropagationToOtherTabs.js.map +1 -0
- package/esm/core/oidcClientTsUserToTokens.d.ts +11 -0
- package/esm/core/oidcClientTsUserToTokens.js +155 -0
- package/esm/core/oidcClientTsUserToTokens.js.map +1 -0
- package/esm/core/ongoingLoginOrRefreshProcesses.d.ts +6 -0
- package/{src/core/ongoingLoginOrRefreshProcesses.ts → esm/core/ongoingLoginOrRefreshProcesses.js} +6 -24
- package/esm/core/ongoingLoginOrRefreshProcesses.js.map +1 -0
- package/esm/core/persistedAuthState.d.ts +28 -0
- package/esm/core/persistedAuthState.js +64 -0
- package/esm/core/persistedAuthState.js.map +1 -0
- package/esm/entrypoint.d.ts +7 -0
- package/{src/entrypoint.ts → esm/entrypoint.js} +3 -26
- package/esm/entrypoint.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -0
- package/esm/keycloak/index.d.ts +3 -0
- package/esm/keycloak/index.js +3 -0
- package/esm/keycloak/index.js.map +1 -0
- package/esm/keycloak/isKeycloak.d.ts +3 -0
- package/esm/keycloak/isKeycloak.js +17 -0
- package/esm/keycloak/isKeycloak.js.map +1 -0
- package/esm/keycloak/keycloak-js/Keycloak.d.ts +284 -0
- package/esm/keycloak/keycloak-js/Keycloak.js +774 -0
- package/esm/keycloak/keycloak-js/Keycloak.js.map +1 -0
- package/esm/keycloak/keycloak-js/index.d.ts +2 -0
- package/esm/keycloak/keycloak-js/index.js +2 -0
- package/esm/keycloak/keycloak-js/index.js.map +1 -0
- package/esm/keycloak/keycloak-js/types.d.ts +361 -0
- package/esm/keycloak/keycloak-js/types.js +2 -0
- package/esm/keycloak/keycloak-js/types.js.map +1 -0
- package/esm/keycloak/keycloakIssuerUriParsed.d.ts +9 -0
- package/esm/keycloak/keycloakIssuerUriParsed.js +16 -0
- package/esm/keycloak/keycloakIssuerUriParsed.js.map +1 -0
- package/esm/keycloak/keycloakUtils.d.ts +37 -0
- package/esm/keycloak/keycloakUtils.js +44 -0
- package/esm/keycloak/keycloakUtils.js.map +1 -0
- package/esm/keycloak-js.d.ts +1 -0
- package/esm/keycloak-js.js +2 -0
- package/esm/keycloak-js.js.map +1 -0
- package/esm/mock/index.js +2 -0
- package/esm/mock/index.js.map +1 -0
- package/esm/mock/oidc.d.ts +19 -0
- package/{src/mock/oidc.ts → esm/mock/oidc.js} +28 -88
- package/esm/mock/oidc.js.map +1 -0
- package/esm/mock/react.d.ts +58 -0
- package/esm/mock/react.js +7 -0
- package/esm/mock/react.js.map +1 -0
- package/esm/react/index.js +2 -0
- package/esm/react/index.js.map +1 -0
- package/esm/react/react.d.ts +102 -0
- package/esm/react/react.js +221 -0
- package/esm/react/react.js.map +1 -0
- package/esm/tools/Deferred.d.ts +14 -0
- package/esm/tools/Deferred.js +23 -0
- package/esm/tools/Deferred.js.map +1 -0
- package/esm/tools/EphemeralSessionStorage.d.ts +12 -0
- package/{src/tools/EphemeralSessionStorage.ts → esm/tools/EphemeralSessionStorage.js} +30 -112
- package/esm/tools/EphemeralSessionStorage.js.map +1 -0
- package/esm/tools/Evt.d.ts +11 -0
- package/{src/tools/Evt.ts → esm/tools/Evt.js} +7 -25
- package/esm/tools/Evt.js.map +1 -0
- package/esm/tools/StatefulEvt.d.ts +12 -0
- package/esm/tools/StatefulEvt.js +21 -0
- package/esm/tools/StatefulEvt.js.map +1 -0
- package/esm/tools/ValueOrAsyncGetter.js +2 -0
- package/esm/tools/ValueOrAsyncGetter.js.map +1 -0
- package/esm/tools/asymmetricEncryption.d.ts +18 -0
- package/esm/tools/asymmetricEncryption.js +85 -0
- package/esm/tools/asymmetricEncryption.js.map +1 -0
- package/esm/tools/base64.d.ts +2 -0
- package/{src/tools/base64.ts → esm/tools/base64.js} +3 -3
- package/esm/tools/base64.js.map +1 -0
- package/esm/tools/createObjectThatThrowsIfAccessed.d.ts +8 -0
- package/{src/tools/createObjectThatThrowsIfAccessed.ts → esm/tools/createObjectThatThrowsIfAccessed.js} +7 -18
- package/esm/tools/createObjectThatThrowsIfAccessed.js.map +1 -0
- package/esm/tools/decodeJwt.d.ts +25 -0
- package/esm/tools/decodeJwt.js +60 -0
- package/esm/tools/decodeJwt.js.map +1 -0
- package/esm/tools/generateUrlSafeRandom.d.ts +3 -0
- package/{src/tools/generateUrlSafeRandom.ts → esm/tools/generateUrlSafeRandom.js} +5 -8
- package/esm/tools/generateUrlSafeRandom.js.map +1 -0
- package/esm/tools/getDownlinkAndRtt.d.ts +4 -0
- package/{src/tools/getDownlinkAndRtt.ts → esm/tools/getDownlinkAndRtt.js} +6 -10
- package/esm/tools/getDownlinkAndRtt.js.map +1 -0
- package/esm/tools/getIsOnline.d.ts +7 -0
- package/{src/tools/getIsOnline.ts → esm/tools/getIsOnline.js} +3 -9
- package/esm/tools/getIsOnline.js.map +1 -0
- package/esm/tools/getIsValidRemoteJson.d.ts +1 -0
- package/esm/tools/getIsValidRemoteJson.js +15 -0
- package/esm/tools/getIsValidRemoteJson.js.map +1 -0
- package/esm/tools/getPrUserInteraction.d.ts +4 -0
- package/{src/tools/getPrUserInteraction.ts → esm/tools/getPrUserInteraction.js} +2 -6
- package/esm/tools/getPrUserInteraction.js.map +1 -0
- package/esm/tools/getUserEnvironmentInfo.d.ts +1 -0
- package/esm/tools/getUserEnvironmentInfo.js +50 -0
- package/esm/tools/getUserEnvironmentInfo.js.map +1 -0
- package/esm/tools/haveSharedParentDomain.d.ts +4 -0
- package/{src/tools/haveSharedParentDomain.ts → esm/tools/haveSharedParentDomain.js} +3 -5
- package/esm/tools/haveSharedParentDomain.js.map +1 -0
- package/esm/tools/isDev.d.ts +1 -0
- package/{src/tools/isDev.ts → esm/tools/isDev.js} +5 -12
- package/esm/tools/isDev.js.map +1 -0
- package/esm/tools/parseKeycloakIssuerUri.d.ts +30 -0
- package/esm/tools/parseKeycloakIssuerUri.js +33 -0
- package/esm/tools/parseKeycloakIssuerUri.js.map +1 -0
- package/esm/tools/readExpirationTimeInJwt.d.ts +1 -0
- package/{src/tools/readExpirationTimeInJwt.ts → esm/tools/readExpirationTimeInJwt.js} +6 -7
- package/esm/tools/readExpirationTimeInJwt.js.map +1 -0
- package/esm/tools/startCountdown.d.ts +11 -0
- package/{src/tools/startCountdown.ts → esm/tools/startCountdown.js} +6 -17
- package/esm/tools/startCountdown.js.map +1 -0
- package/esm/tools/subscribeToUserInteraction.d.ts +6 -0
- package/{src/tools/subscribeToUserInteraction.ts → esm/tools/subscribeToUserInteraction.js} +4 -13
- package/esm/tools/subscribeToUserInteraction.js.map +1 -0
- package/esm/tools/toFullyQualifiedUrl.d.ts +10 -0
- package/{src/tools/toFullyQualifiedUrl.ts → esm/tools/toFullyQualifiedUrl.js} +7 -25
- package/esm/tools/toFullyQualifiedUrl.js.map +1 -0
- package/esm/tools/toHumanReadableDuration.d.ts +1 -0
- package/{src/tools/toHumanReadableDuration.ts → esm/tools/toHumanReadableDuration.js} +8 -5
- package/esm/tools/toHumanReadableDuration.js.map +1 -0
- package/esm/tools/urlSearchParams.d.ts +19 -0
- package/{src/tools/urlSearchParams.ts → esm/tools/urlSearchParams.js} +24 -70
- package/esm/tools/urlSearchParams.js.map +1 -0
- package/esm/tools/workerTimers.d.ts +5 -0
- package/{src/tools/workerTimers.ts → esm/tools/workerTimers.js} +7 -27
- package/esm/tools/workerTimers.js.map +1 -0
- package/esm/vendor/frontend/oidc-client-ts.d.ts +1 -0
- package/esm/vendor/frontend/oidc-client-ts.js +3636 -0
- package/{src/vendor/frontend/tsafe.ts → esm/vendor/frontend/tsafe.d.ts} +1 -0
- package/esm/vendor/frontend/tsafe.js +1 -0
- package/esm/vendor/frontend/worker-timers.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/keycloak/index.d.ts +3 -0
- package/keycloak/index.js +8 -0
- package/keycloak/index.js.map +1 -0
- package/keycloak/isKeycloak.d.ts +3 -0
- package/keycloak/isKeycloak.js +20 -0
- package/keycloak/isKeycloak.js.map +1 -0
- package/keycloak/keycloak-js/Keycloak.d.ts +284 -0
- package/keycloak/keycloak-js/Keycloak.js +778 -0
- package/keycloak/keycloak-js/Keycloak.js.map +1 -0
- package/keycloak/keycloak-js/index.d.ts +2 -0
- package/keycloak/keycloak-js/index.js +6 -0
- package/keycloak/keycloak-js/index.js.map +1 -0
- package/keycloak/keycloak-js/types.d.ts +361 -0
- package/keycloak/keycloak-js/types.js +3 -0
- package/keycloak/keycloak-js/types.js.map +1 -0
- package/keycloak/keycloakIssuerUriParsed.d.ts +9 -0
- package/keycloak/keycloakIssuerUriParsed.js +19 -0
- package/keycloak/keycloakIssuerUriParsed.js.map +1 -0
- package/keycloak/keycloakUtils.d.ts +37 -0
- package/keycloak/keycloakUtils.js +47 -0
- package/keycloak/keycloakUtils.js.map +1 -0
- package/keycloak-js.d.ts +1 -0
- package/keycloak-js.js +18 -0
- package/keycloak-js.js.map +1 -0
- package/mock/index.js.map +1 -1
- package/mock/oidc.js +147 -194
- package/mock/oidc.js.map +1 -1
- package/mock/react.js +2 -2
- package/mock/react.js.map +1 -1
- package/package.json +74 -299
- package/react/index.js.map +1 -1
- package/react/react.js +133 -244
- package/react/react.js.map +1 -1
- package/tools/Deferred.js +13 -35
- package/tools/Deferred.js.map +1 -1
- package/tools/EphemeralSessionStorage.js +46 -48
- package/tools/EphemeralSessionStorage.js.map +1 -1
- package/tools/Evt.js +14 -14
- package/tools/Evt.js.map +1 -1
- package/tools/StatefulEvt.js +5 -5
- package/tools/StatefulEvt.js.map +1 -1
- package/tools/ValueOrAsyncGetter.js.map +1 -1
- package/tools/asymmetricEncryption.js +81 -172
- package/tools/asymmetricEncryption.js.map +1 -1
- package/tools/base64.js +2 -2
- package/tools/base64.js.map +1 -1
- package/tools/createObjectThatThrowsIfAccessed.js +13 -61
- package/tools/createObjectThatThrowsIfAccessed.js.map +1 -1
- package/tools/decodeJwt.d.ts +25 -2
- package/tools/decodeJwt.js +61 -3
- package/tools/decodeJwt.js.map +1 -1
- package/tools/generateUrlSafeRandom.js +5 -30
- package/tools/generateUrlSafeRandom.js.map +1 -1
- package/tools/getDownlinkAndRtt.js +8 -30
- package/tools/getDownlinkAndRtt.js.map +1 -1
- package/tools/getIsOnline.js +3 -3
- package/tools/getIsOnline.js.map +1 -1
- package/tools/getIsValidRemoteJson.js +12 -59
- package/tools/getIsValidRemoteJson.js.map +1 -1
- package/tools/getPrUserInteraction.js +4 -4
- package/tools/getPrUserInteraction.js.map +1 -1
- package/tools/getUserEnvironmentInfo.js +17 -12
- package/tools/getUserEnvironmentInfo.js.map +1 -1
- package/tools/haveSharedParentDomain.js +5 -5
- package/tools/haveSharedParentDomain.js.map +1 -1
- package/tools/isDev.js +2 -2
- package/tools/isDev.js.map +1 -1
- package/tools/parseKeycloakIssuerUri.d.ts +2 -0
- package/tools/parseKeycloakIssuerUri.js +11 -42
- package/tools/parseKeycloakIssuerUri.js.map +1 -1
- package/tools/readExpirationTimeInJwt.js +4 -4
- package/tools/readExpirationTimeInJwt.js.map +1 -1
- package/tools/startCountdown.js +17 -65
- package/tools/startCountdown.js.map +1 -1
- package/tools/subscribeToUserInteraction.js +17 -66
- package/tools/subscribeToUserInteraction.js.map +1 -1
- package/tools/toFullyQualifiedUrl.js +7 -7
- package/tools/toFullyQualifiedUrl.js.map +1 -1
- package/tools/toHumanReadableDuration.js +13 -13
- package/tools/toHumanReadableDuration.js.map +1 -1
- package/tools/urlSearchParams.js +28 -50
- package/tools/urlSearchParams.js.map +1 -1
- package/tools/workerTimers.js +10 -10
- package/tools/workerTimers.js.map +1 -1
- package/vendor/frontend/oidc-client-ts.d.ts +1 -0
- package/vendor/frontend/oidc-client-ts.js +3686 -0
- package/vendor/frontend/tsafe.d.ts +1 -0
- package/vendor/frontend/tsafe.js +1 -1
- package/LICENSE +0 -21
- package/README.md +0 -185
- package/core/trustedFetch.d.ts +0 -2
- package/core/trustedFetch.js +0 -12
- package/core/trustedFetch.js.map +0 -1
- package/src/backend.ts +0 -391
- package/src/core/Oidc.ts +0 -141
- package/src/core/StateData.ts +0 -118
- package/src/core/configId.ts +0 -3
- package/src/core/loginSilent.ts +0 -206
- package/src/core/oidcClientTsUserToTokens.ts +0 -229
- package/src/core/persistedAuthState.ts +0 -122
- package/src/core/trustedFetch.ts +0 -9
- package/src/index.ts +0 -7
- package/src/mock/react.tsx +0 -11
- package/src/react/react.tsx +0 -460
- package/src/tools/Deferred.ts +0 -39
- package/src/tools/StatefulEvt.ts +0 -38
- package/src/tools/asymmetricEncryption.ts +0 -184
- package/src/tools/decodeJwt.ts +0 -2
- package/src/tools/getIsValidRemoteJson.ts +0 -18
- package/src/tools/getUserEnvironmentInfo.ts +0 -42
- package/src/tools/parseKeycloakIssuerUri.ts +0 -68
- package/src/vendor/backend/evt.ts +0 -2
- package/src/vendor/backend/jsonwebtoken.ts +0 -1
- package/src/vendor/backend/node-fetch.ts +0 -2
- package/src/vendor/backend/node-jose.ts +0 -1
- package/src/vendor/backend/tsafe.ts +0 -5
- package/src/vendor/backend/zod.ts +0 -1
- package/src/vendor/frontend/oidc-client-ts-and-jwt-decode.ts +0 -4
- package/vendor/frontend/oidc-client-ts-and-jwt-decode.d.ts +0 -3
- package/vendor/frontend/oidc-client-ts-and-jwt-decode.js +0 -3
- /package/{src/mock/index.ts → esm/mock/index.d.ts} +0 -0
- /package/{src/react/index.ts → esm/react/index.d.ts} +0 -0
- /package/{src/tools/ValueOrAsyncGetter.ts → esm/tools/ValueOrAsyncGetter.d.ts} +0 -0
- /package/{src/vendor/frontend/worker-timers.ts → esm/vendor/frontend/worker-timers.d.ts} +0 -0
|
@@ -1,62 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __values = (this && this.__values) || function(o) {
|
|
14
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
|
-
if (m) return m.call(o);
|
|
16
|
-
if (o && typeof o.length === "number") return {
|
|
17
|
-
next: function () {
|
|
18
|
-
if (o && i >= o.length) o = void 0;
|
|
19
|
-
return { value: o && o[i++], done: !o };
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
23
|
-
};
|
|
24
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
25
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26
|
-
if (!m) return o;
|
|
27
|
-
var i = m.call(o), r, ar = [], e;
|
|
28
|
-
try {
|
|
29
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
30
|
-
}
|
|
31
|
-
catch (error) { e = { error: error }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e) throw e.error; }
|
|
37
|
-
}
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
-
if (ar || !(i in from)) {
|
|
43
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
-
ar[i] = from[i];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
-
};
|
|
49
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
3
|
exports.moveRedirectAuthResponseFromSessionStorageToMemory = void 0;
|
|
51
4
|
exports.handleOidcCallback = handleOidcCallback;
|
|
52
5
|
exports.retrieveRedirectAuthResponseAndStateData = retrieveRedirectAuthResponseAndStateData;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(0, trustedFetch_1.captureFetch)();
|
|
59
|
-
var globalContext = {
|
|
6
|
+
const StateData_1 = require("./StateData");
|
|
7
|
+
const tsafe_1 = require("../vendor/frontend/tsafe");
|
|
8
|
+
const initialLocationHref_1 = require("./initialLocationHref");
|
|
9
|
+
const iframeMessageProtection_1 = require("./iframeMessageProtection");
|
|
10
|
+
const globalContext = {
|
|
60
11
|
previousCall: (0, tsafe_1.id)(undefined)
|
|
61
12
|
};
|
|
62
13
|
function handleOidcCallback() {
|
|
@@ -66,43 +17,59 @@ function handleOidcCallback() {
|
|
|
66
17
|
return (globalContext.previousCall = handleOidcCallback_nonMemoized());
|
|
67
18
|
}
|
|
68
19
|
function handleOidcCallback_nonMemoized() {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
20
|
+
const location_urlObj = new URL(initialLocationHref_1.initialLocationHref);
|
|
21
|
+
const stateUrlParamValue_wrap = (() => {
|
|
22
|
+
fragment: {
|
|
23
|
+
const stateUrlParamValue = new URLSearchParams(location_urlObj.hash.replace(/^#/, "")).get("state");
|
|
24
|
+
if (stateUrlParamValue === null) {
|
|
25
|
+
break fragment;
|
|
26
|
+
}
|
|
27
|
+
if (!(0, StateData_1.getIsStatQueryParamValue)({ maybeStateUrlParamValue: stateUrlParamValue })) {
|
|
28
|
+
break fragment;
|
|
29
|
+
}
|
|
30
|
+
return { stateUrlParamValue, isFragment: true };
|
|
78
31
|
}
|
|
79
|
-
|
|
80
|
-
location_urlObj.searchParams.get("
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
32
|
+
query: {
|
|
33
|
+
const stateUrlParamValue = location_urlObj.searchParams.get("state");
|
|
34
|
+
if (stateUrlParamValue === null) {
|
|
35
|
+
break query;
|
|
36
|
+
}
|
|
37
|
+
if (!(0, StateData_1.getIsStatQueryParamValue)({ maybeStateUrlParamValue: stateUrlParamValue })) {
|
|
38
|
+
break query;
|
|
39
|
+
}
|
|
40
|
+
if (location_urlObj.searchParams.get("client_id") !== null &&
|
|
41
|
+
location_urlObj.searchParams.get("response_type") !== null &&
|
|
42
|
+
location_urlObj.searchParams.get("redirect_uri") !== null) {
|
|
43
|
+
// NOTE: We are probably in a Keycloakify theme and oidc-spa was loaded by mistake.
|
|
44
|
+
break query;
|
|
45
|
+
}
|
|
46
|
+
return { stateUrlParamValue, isFragment: false };
|
|
84
47
|
}
|
|
85
|
-
return
|
|
48
|
+
return undefined;
|
|
86
49
|
})();
|
|
87
|
-
if (
|
|
88
|
-
|
|
50
|
+
if (stateUrlParamValue_wrap === undefined) {
|
|
51
|
+
const backForwardTracker = readBackForwardTracker();
|
|
89
52
|
if (backForwardTracker !== undefined) {
|
|
90
53
|
writeBackForwardTracker({
|
|
91
|
-
backForwardTracker:
|
|
54
|
+
backForwardTracker: {
|
|
55
|
+
...backForwardTracker,
|
|
56
|
+
hasExitedCallback: true
|
|
57
|
+
}
|
|
92
58
|
});
|
|
93
59
|
}
|
|
94
60
|
return { isHandled: false };
|
|
95
61
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
console.
|
|
99
|
-
console.
|
|
100
|
-
console.
|
|
101
|
-
|
|
62
|
+
const isHandled = true;
|
|
63
|
+
const { stateUrlParamValue, isFragment } = stateUrlParamValue_wrap;
|
|
64
|
+
console.log = () => { };
|
|
65
|
+
console.warn = () => { };
|
|
66
|
+
console.error = () => { };
|
|
67
|
+
console.debug = () => { };
|
|
68
|
+
const stateData = (0, StateData_1.getStateData)({ stateUrlParamValue });
|
|
102
69
|
if (stateData === undefined ||
|
|
103
70
|
(stateData.context === "redirect" && stateData.hasBeenProcessedByCallback)) {
|
|
104
|
-
|
|
105
|
-
|
|
71
|
+
const historyMethod = (() => {
|
|
72
|
+
const backForwardTracker = readBackForwardTracker();
|
|
106
73
|
if (backForwardTracker === undefined) {
|
|
107
74
|
return "back";
|
|
108
75
|
}
|
|
@@ -118,58 +85,47 @@ function handleOidcCallback_nonMemoized() {
|
|
|
118
85
|
})();
|
|
119
86
|
writeBackForwardTracker({
|
|
120
87
|
backForwardTracker: {
|
|
121
|
-
previousHistoryMethod:
|
|
88
|
+
previousHistoryMethod: historyMethod,
|
|
122
89
|
hasExitedCallback: false
|
|
123
90
|
}
|
|
124
91
|
});
|
|
125
|
-
setTimeout(
|
|
92
|
+
setTimeout(() => {
|
|
126
93
|
reloadOnBfCacheNavigation();
|
|
127
|
-
window.history[
|
|
94
|
+
window.history[historyMethod]();
|
|
128
95
|
// NOTE: This is a "better than nothing" approach.
|
|
129
96
|
// Under some circumstances it's possible to get stuck on this url
|
|
130
97
|
// if there is no "next" page in the history for example, navigating
|
|
131
98
|
// forward is a NoOp. So in that case it's better to reload the same route
|
|
132
99
|
// with just the authResponse removed from the url to avoid re-entering here.
|
|
133
|
-
setTimeout(
|
|
134
|
-
|
|
135
|
-
window.location.href =
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
const { protocol, host, pathname, hash } = window.location;
|
|
102
|
+
window.location.href = `${protocol}//${host}${pathname}${hash}`;
|
|
136
103
|
}, 350);
|
|
137
104
|
}, 0);
|
|
138
|
-
return { isHandled
|
|
105
|
+
return { isHandled };
|
|
139
106
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
148
|
-
finally {
|
|
149
|
-
try {
|
|
150
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
151
|
-
}
|
|
152
|
-
finally { if (e_1) throw e_1.error; }
|
|
107
|
+
const authResponse = { state: "" };
|
|
108
|
+
for (const [key, value] of isFragment
|
|
109
|
+
? new URLSearchParams(location_urlObj.hash.replace(/^#/, ""))
|
|
110
|
+
: location_urlObj.searchParams) {
|
|
111
|
+
authResponse[key] = value;
|
|
153
112
|
}
|
|
154
113
|
(0, tsafe_1.assert)(authResponse.state !== "", "063965");
|
|
155
114
|
switch (stateData.context) {
|
|
156
115
|
case "iframe":
|
|
157
116
|
(0, iframeMessageProtection_1.encryptAuthResponse)({
|
|
158
|
-
authResponse
|
|
159
|
-
}).then(
|
|
160
|
-
var encryptedMessage = _a.encryptedMessage;
|
|
161
|
-
return parent.postMessage(encryptedMessage, location.origin);
|
|
162
|
-
});
|
|
117
|
+
authResponse
|
|
118
|
+
}).then(({ encryptedMessage }) => parent.postMessage(encryptedMessage, location.origin));
|
|
163
119
|
break;
|
|
164
120
|
case "redirect":
|
|
165
|
-
(0, StateData_1.markStateDataAsProcessedByCallback)({
|
|
121
|
+
(0, StateData_1.markStateDataAsProcessedByCallback)({ stateUrlParamValue });
|
|
166
122
|
clearBackForwardTracker();
|
|
167
123
|
writeRedirectAuthResponses({
|
|
168
|
-
authResponses:
|
|
124
|
+
authResponses: [...readRedirectAuthResponses(), authResponse]
|
|
169
125
|
});
|
|
170
126
|
reloadOnBfCacheNavigation();
|
|
171
|
-
setTimeout(
|
|
172
|
-
|
|
127
|
+
setTimeout(() => {
|
|
128
|
+
const href = (() => {
|
|
173
129
|
if (stateData.action === "login" && authResponse.error === "consent_required") {
|
|
174
130
|
return stateData.redirectUrl_consentRequiredCase;
|
|
175
131
|
}
|
|
@@ -179,11 +135,11 @@ function handleOidcCallback_nonMemoized() {
|
|
|
179
135
|
}, 0);
|
|
180
136
|
break;
|
|
181
137
|
}
|
|
182
|
-
return { isHandled
|
|
138
|
+
return { isHandled };
|
|
183
139
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
140
|
+
const { readRedirectAuthResponses, writeRedirectAuthResponses, moveRedirectAuthResponseFromSessionStorageToMemory } = (() => {
|
|
141
|
+
const AUTH_RESPONSES_KEY = "oidc-spa:authResponses";
|
|
142
|
+
let authResponses_movedToMemoryFromSessionStorage = undefined;
|
|
187
143
|
// NOTE: Here we note that we can re-write on session storage some auth response
|
|
188
144
|
// after earlyInit in retrieveRedirectAuthResponseAndStateData
|
|
189
145
|
// In situation where there are more than one client in the same app and we can't use iframe,
|
|
@@ -192,7 +148,7 @@ var _a = (function () {
|
|
|
192
148
|
// can be instantiated at any time really.
|
|
193
149
|
// So the move to memory of the response is fully effective only when theres one client.
|
|
194
150
|
function writeRedirectAuthResponses(params) {
|
|
195
|
-
|
|
151
|
+
const { authResponses } = params;
|
|
196
152
|
authResponses_movedToMemoryFromSessionStorage = undefined;
|
|
197
153
|
if (authResponses.length === 0) {
|
|
198
154
|
sessionStorage.removeItem(AUTH_RESPONSES_KEY);
|
|
@@ -204,74 +160,63 @@ var _a = (function () {
|
|
|
204
160
|
if (authResponses_movedToMemoryFromSessionStorage !== undefined) {
|
|
205
161
|
return authResponses_movedToMemoryFromSessionStorage;
|
|
206
162
|
}
|
|
207
|
-
|
|
163
|
+
const raw = sessionStorage.getItem(AUTH_RESPONSES_KEY);
|
|
208
164
|
if (raw === null) {
|
|
209
165
|
return [];
|
|
210
166
|
}
|
|
211
167
|
return JSON.parse(raw);
|
|
212
168
|
}
|
|
213
169
|
function moveRedirectAuthResponseFromSessionStorageToMemory() {
|
|
214
|
-
|
|
170
|
+
const authResponses = readRedirectAuthResponses();
|
|
215
171
|
writeRedirectAuthResponses({ authResponses: [] });
|
|
216
172
|
authResponses_movedToMemoryFromSessionStorage = authResponses;
|
|
217
173
|
}
|
|
218
174
|
return {
|
|
219
|
-
writeRedirectAuthResponses
|
|
220
|
-
readRedirectAuthResponses
|
|
221
|
-
moveRedirectAuthResponseFromSessionStorageToMemory
|
|
175
|
+
writeRedirectAuthResponses,
|
|
176
|
+
readRedirectAuthResponses,
|
|
177
|
+
moveRedirectAuthResponseFromSessionStorageToMemory
|
|
222
178
|
};
|
|
223
|
-
})()
|
|
179
|
+
})();
|
|
224
180
|
exports.moveRedirectAuthResponseFromSessionStorageToMemory = moveRedirectAuthResponseFromSessionStorageToMemory;
|
|
225
181
|
function retrieveRedirectAuthResponseAndStateData(params) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var stateData = (0, StateData_1.getStateData)({ stateQueryParamValue: authResponse.state });
|
|
234
|
-
if (stateData === undefined) {
|
|
235
|
-
// NOTE: We do not understand how this can happen but it can.
|
|
236
|
-
authResponses.splice(authResponses.indexOf(authResponse), 1);
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
(0, tsafe_1.assert)(stateData.context === "redirect", "474728");
|
|
240
|
-
if (stateData.configId !== configId) {
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
182
|
+
const { configId } = params;
|
|
183
|
+
const authResponses = readRedirectAuthResponses();
|
|
184
|
+
let authResponseAndStateData = undefined;
|
|
185
|
+
for (const authResponse of [...authResponses]) {
|
|
186
|
+
const stateData = (0, StateData_1.getStateData)({ stateUrlParamValue: authResponse.state });
|
|
187
|
+
if (stateData === undefined) {
|
|
188
|
+
// NOTE: We do not understand how this can happen but it can.
|
|
243
189
|
authResponses.splice(authResponses.indexOf(authResponse), 1);
|
|
244
|
-
|
|
190
|
+
continue;
|
|
245
191
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
try {
|
|
250
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
192
|
+
(0, tsafe_1.assert)(stateData.context === "redirect", "474728");
|
|
193
|
+
if (stateData.configId !== configId) {
|
|
194
|
+
continue;
|
|
251
195
|
}
|
|
252
|
-
|
|
196
|
+
authResponses.splice(authResponses.indexOf(authResponse), 1);
|
|
197
|
+
authResponseAndStateData = { authResponse, stateData };
|
|
253
198
|
}
|
|
254
|
-
writeRedirectAuthResponses({ authResponses
|
|
199
|
+
writeRedirectAuthResponses({ authResponses });
|
|
255
200
|
return authResponseAndStateData;
|
|
256
201
|
}
|
|
257
202
|
function reloadOnBfCacheNavigation() {
|
|
258
|
-
|
|
259
|
-
window.addEventListener("pageshow",
|
|
260
|
-
|
|
203
|
+
const start = Date.now();
|
|
204
|
+
window.addEventListener("pageshow", () => {
|
|
205
|
+
const elapsed = Date.now() - start;
|
|
261
206
|
if (elapsed < 100) {
|
|
262
207
|
return;
|
|
263
208
|
}
|
|
264
209
|
location.reload();
|
|
265
210
|
});
|
|
266
211
|
}
|
|
267
|
-
|
|
268
|
-
|
|
212
|
+
const { writeBackForwardTracker, readBackForwardTracker, clearBackForwardTracker } = (() => {
|
|
213
|
+
const BACK_NAVIGATION_TRACKER_KEY = "oidc-spa:callback-back-forward-tracker";
|
|
269
214
|
function writeBackForwardTracker(params) {
|
|
270
|
-
|
|
215
|
+
const { backForwardTracker } = params;
|
|
271
216
|
sessionStorage.setItem(BACK_NAVIGATION_TRACKER_KEY, JSON.stringify(backForwardTracker));
|
|
272
217
|
}
|
|
273
218
|
function readBackForwardTracker() {
|
|
274
|
-
|
|
219
|
+
const raw = sessionStorage.getItem(BACK_NAVIGATION_TRACKER_KEY);
|
|
275
220
|
if (raw === null) {
|
|
276
221
|
return undefined;
|
|
277
222
|
}
|
|
@@ -280,6 +225,6 @@ var _b = (function () {
|
|
|
280
225
|
function clearBackForwardTracker() {
|
|
281
226
|
sessionStorage.removeItem(BACK_NAVIGATION_TRACKER_KEY);
|
|
282
227
|
}
|
|
283
|
-
return { writeBackForwardTracker
|
|
284
|
-
})()
|
|
228
|
+
return { writeBackForwardTracker, readBackForwardTracker, clearBackForwardTracker };
|
|
229
|
+
})();
|
|
285
230
|
//# sourceMappingURL=handleOidcCallback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleOidcCallback.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"handleOidcCallback.js","sourceRoot":"","sources":["../../src/core/handleOidcCallback.ts"],"names":[],"mappings":";;;AAeA,gDAMC;AA8ND,4FAkCC;AArRD,2CAKqB;AACrB,oDAAsD;AAEtD,+DAA4D;AAC5D,uEAAgE;AAEhE,MAAM,aAAa,GAAG;IAClB,YAAY,EAAE,IAAA,UAAE,EAAqC,SAAS,CAAC;CAClE,CAAC;AAEF,SAAgB,kBAAkB;IAC9B,IAAI,aAAa,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC3C,OAAO,aAAa,CAAC,YAA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GAAG,MAAM,CAAC;QAEtC,cAAc,CAAC,OAAO,CAAC,2BAA2B,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5F,CAAC;IAED,SAAS,sBAAsB;QAC3B,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QAEhE,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACf,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,SAAS,uBAAuB;QAC5B,cAAc,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,CAAC;AACxF,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AuthResponse } from "./AuthResponse";
|
|
2
2
|
export declare function preventSessionStorageSetItemOfPublicKeyByThirdParty(): void;
|
|
3
3
|
export declare function initIframeMessageProtection(params: {
|
|
4
|
-
|
|
4
|
+
stateUrlParamValue: string;
|
|
5
5
|
}): Promise<{
|
|
6
6
|
getIsEncryptedAuthResponse: (params: {
|
|
7
7
|
message: unknown;
|
|
@@ -1,51 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.preventSessionStorageSetItemOfPublicKeyByThirdParty = preventSessionStorageSetItemOfPublicKeyByThirdParty;
|
|
40
4
|
exports.initIframeMessageProtection = initIframeMessageProtection;
|
|
41
5
|
exports.encryptAuthResponse = encryptAuthResponse;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
6
|
+
const tsafe_1 = require("../vendor/frontend/tsafe");
|
|
7
|
+
const asymmetricEncryption_1 = require("../tools/asymmetricEncryption");
|
|
8
|
+
const sessionStorage_original = window.sessionStorage;
|
|
9
|
+
const setItem_real = Storage.prototype.setItem;
|
|
10
|
+
const SESSION_STORAGE_PREFIX = "oidc-spa_iframe_authResponse_publicKey_";
|
|
47
11
|
function preventSessionStorageSetItemOfPublicKeyByThirdParty() {
|
|
48
|
-
|
|
12
|
+
const setItem_protected = function setItem(key, value) {
|
|
49
13
|
if (this !== sessionStorage_original) {
|
|
50
14
|
return setItem_real.call(this, key, value);
|
|
51
15
|
}
|
|
@@ -55,7 +19,7 @@ function preventSessionStorageSetItemOfPublicKeyByThirdParty() {
|
|
|
55
19
|
return setItem_real.call(sessionStorage_original, key, value);
|
|
56
20
|
};
|
|
57
21
|
{
|
|
58
|
-
|
|
22
|
+
const pd = Object.getOwnPropertyDescriptor(Storage.prototype, "setItem");
|
|
59
23
|
(0, tsafe_1.assert)(pd !== undefined);
|
|
60
24
|
Object.defineProperty(Storage.prototype, "setItem", {
|
|
61
25
|
enumerable: pd.enumerable,
|
|
@@ -64,73 +28,43 @@ function preventSessionStorageSetItemOfPublicKeyByThirdParty() {
|
|
|
64
28
|
});
|
|
65
29
|
}
|
|
66
30
|
}
|
|
67
|
-
|
|
31
|
+
const ENCRYPTED_AUTH_RESPONSES_PREFIX = "oidc-spa_encrypted_authResponse_";
|
|
68
32
|
function getSessionStorageKey(params) {
|
|
69
|
-
|
|
70
|
-
return
|
|
33
|
+
const { stateUrlParamValue } = params;
|
|
34
|
+
return `${SESSION_STORAGE_PREFIX}${stateUrlParamValue}`;
|
|
71
35
|
}
|
|
72
|
-
function initIframeMessageProtection(params) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
encryptedMessage: encryptedAuthResponse.slice(ENCRYPTED_AUTH_RESPONSES_PREFIX.length),
|
|
87
|
-
privateKey: privateKey
|
|
88
|
-
})];
|
|
89
|
-
case 1:
|
|
90
|
-
authResponse_str = (_a.sent()).message;
|
|
91
|
-
authResponse = JSON.parse(authResponse_str);
|
|
92
|
-
return [2 /*return*/, { authResponse: authResponse }];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function clearSessionStoragePublicKey() {
|
|
98
|
-
sessionStorage.removeItem(sessionStorageKey);
|
|
99
|
-
}
|
|
100
|
-
var stateQueryParamValue, _a, publicKey, privateKey, sessionStorageKey;
|
|
101
|
-
return __generator(this, function (_b) {
|
|
102
|
-
switch (_b.label) {
|
|
103
|
-
case 0:
|
|
104
|
-
stateQueryParamValue = params.stateQueryParamValue;
|
|
105
|
-
return [4 /*yield*/, (0, asymmetricEncryption_1.generateKeys)()];
|
|
106
|
-
case 1:
|
|
107
|
-
_a = _b.sent(), publicKey = _a.publicKey, privateKey = _a.privateKey;
|
|
108
|
-
sessionStorageKey = getSessionStorageKey({ stateQueryParamValue: stateQueryParamValue });
|
|
109
|
-
setItem_real.call(sessionStorage, sessionStorageKey, publicKey);
|
|
110
|
-
return [2 /*return*/, { getIsEncryptedAuthResponse: getIsEncryptedAuthResponse, decodeEncryptedAuth: decodeEncryptedAuth, clearSessionStoragePublicKey: clearSessionStoragePublicKey }];
|
|
111
|
-
}
|
|
36
|
+
async function initIframeMessageProtection(params) {
|
|
37
|
+
const { stateUrlParamValue } = params;
|
|
38
|
+
const { publicKey, privateKey } = await (0, asymmetricEncryption_1.generateKeys)();
|
|
39
|
+
const sessionStorageKey = getSessionStorageKey({ stateUrlParamValue });
|
|
40
|
+
setItem_real.call(sessionStorage, sessionStorageKey, publicKey);
|
|
41
|
+
function getIsEncryptedAuthResponse(params) {
|
|
42
|
+
const { message } = params;
|
|
43
|
+
return typeof message === "string" && message.startsWith(ENCRYPTED_AUTH_RESPONSES_PREFIX);
|
|
44
|
+
}
|
|
45
|
+
async function decodeEncryptedAuth(params) {
|
|
46
|
+
const { encryptedAuthResponse } = params;
|
|
47
|
+
const { message: authResponse_str } = await (0, asymmetricEncryption_1.asymmetricDecrypt)({
|
|
48
|
+
encryptedMessage: encryptedAuthResponse.slice(ENCRYPTED_AUTH_RESPONSES_PREFIX.length),
|
|
49
|
+
privateKey
|
|
112
50
|
});
|
|
113
|
-
|
|
51
|
+
const authResponse = JSON.parse(authResponse_str);
|
|
52
|
+
return { authResponse };
|
|
53
|
+
}
|
|
54
|
+
function clearSessionStoragePublicKey() {
|
|
55
|
+
sessionStorage.removeItem(sessionStorageKey);
|
|
56
|
+
}
|
|
57
|
+
return { getIsEncryptedAuthResponse, decodeEncryptedAuth, clearSessionStoragePublicKey };
|
|
114
58
|
}
|
|
115
|
-
function encryptAuthResponse(params) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
publicKey = sessionStorage.getItem(getSessionStorageKey({ stateQueryParamValue: authResponse.state }));
|
|
123
|
-
(0, tsafe_1.assert)(publicKey !== null, "2293302");
|
|
124
|
-
return [4 /*yield*/, (0, asymmetricEncryption_1.asymmetricEncrypt)({
|
|
125
|
-
publicKey: publicKey,
|
|
126
|
-
message: JSON.stringify(authResponse)
|
|
127
|
-
})];
|
|
128
|
-
case 1:
|
|
129
|
-
encryptedMessage_withoutPrefix = (_a.sent()).encryptedMessage;
|
|
130
|
-
encryptedMessage = "".concat(ENCRYPTED_AUTH_RESPONSES_PREFIX).concat(encryptedMessage_withoutPrefix);
|
|
131
|
-
return [2 /*return*/, { encryptedMessage: encryptedMessage }];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
59
|
+
async function encryptAuthResponse(params) {
|
|
60
|
+
const { authResponse } = params;
|
|
61
|
+
const publicKey = sessionStorage.getItem(getSessionStorageKey({ stateUrlParamValue: authResponse.state }));
|
|
62
|
+
(0, tsafe_1.assert)(publicKey !== null, "2293302");
|
|
63
|
+
const { encryptedMessage: encryptedMessage_withoutPrefix } = await (0, asymmetricEncryption_1.asymmetricEncrypt)({
|
|
64
|
+
publicKey,
|
|
65
|
+
message: JSON.stringify(authResponse)
|
|
134
66
|
});
|
|
67
|
+
const encryptedMessage = `${ENCRYPTED_AUTH_RESPONSES_PREFIX}${encryptedMessage_withoutPrefix}`;
|
|
68
|
+
return { encryptedMessage };
|
|
135
69
|
}
|
|
136
70
|
//# sourceMappingURL=iframeMessageProtection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframeMessageProtection.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"iframeMessageProtection.js","sourceRoot":"","sources":["../../src/core/iframeMessageProtection.ts"],"names":[],"mappings":";;AASA,kHA0BC;AAUD,kEAmCC;AAED,kDAiBC;AAnGD,oDAAkD;AAClD,wEAAmG;AAGnG,MAAM,uBAAuB,GAAG,MAAM,CAAC,cAAc,CAAC;AACtD,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;AAE/C,MAAM,sBAAsB,GAAG,yCAAyC,CAAC;AAEzE,SAAgB,mDAAmD;IAC/D,MAAM,iBAAiB,GAAG,SAAS,OAAO,CAAY,GAAW,EAAE,KAAa;QAC5E,IAAI,IAAI,KAAK,uBAAu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AAO,EAAE,gBAAgB,EAAE,CAAC;AAChC,CAAC"}
|
package/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { Oidc } from "./Oidc";
|
|
2
2
|
export { createOidc, type ParamsOfCreateOidc } from "./createOidc";
|
|
3
3
|
export { OidcInitializationError } from "./OidcInitializationError";
|
|
4
|
-
export {
|
|
4
|
+
export { handleOidcCallback } from "./handleOidcCallback";
|
package/core/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.handleOidcCallback = exports.OidcInitializationError = exports.createOidc = void 0;
|
|
4
4
|
var createOidc_1 = require("./createOidc");
|
|
5
5
|
Object.defineProperty(exports, "createOidc", { enumerable: true, get: function () { return createOidc_1.createOidc; } });
|
|
6
6
|
var OidcInitializationError_1 = require("./OidcInitializationError");
|
|
7
7
|
Object.defineProperty(exports, "OidcInitializationError", { enumerable: true, get: function () { return OidcInitializationError_1.OidcInitializationError; } });
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
8
|
+
var handleOidcCallback_1 = require("./handleOidcCallback");
|
|
9
|
+
Object.defineProperty(exports, "handleOidcCallback", { enumerable: true, get: function () { return handleOidcCallback_1.handleOidcCallback; } });
|
|
10
10
|
//# sourceMappingURL=index.js.map
|