passbolt-styleguide 3.8.3 → 3.9.0-alpha1
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/build/css/help.min.css +3 -3
- package/build/css/public.min.css +3 -3
- package/build/css/themes/default/api_authentication.min.css +3 -3
- package/build/css/themes/default/api_cloud.min.css +3 -3
- package/build/css/themes/default/api_main.min.css +3 -3
- package/build/css/themes/default/api_reports.min.css +3 -3
- package/build/css/themes/default/api_webinstaller.min.css +3 -3
- package/build/css/themes/default/ext_app.min.css +3 -3
- package/build/css/themes/default/ext_authentication.min.css +3 -3
- package/build/css/themes/default/ext_external.min.css +2 -2
- package/build/css/themes/default/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/default/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/default/ext_quickaccess.min.css +3 -3
- package/build/css/themes/midgar/api_authentication.min.css +3 -3
- package/build/css/themes/midgar/api_main.min.css +3 -3
- package/build/css/themes/midgar/api_reports.min.css +3 -3
- package/build/css/themes/midgar/ext_app.min.css +3 -3
- package/build/css/themes/midgar/ext_authentication.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/midgar/ext_quickaccess.min.css +3 -3
- package/build/css/themes/solarized_dark/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/api_main.min.css +1 -1
- package/build/css/themes/solarized_dark/api_reports.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_app.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_quickaccess.min.css +1 -1
- package/build/css/themes/solarized_light/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/api_main.min.css +1 -1
- package/build/css/themes/solarized_light/api_reports.min.css +1 -1
- package/build/css/themes/solarized_light/ext_app.min.css +1 -1
- package/build/css/themes/solarized_light/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_light/ext_quickaccess.min.css +1 -1
- package/build/js/dist/api-app.js +1 -1
- package/build/js/dist/api-app.js.LICENSE.txt +75 -5
- package/build/js/dist/api-feedback.js +2 -0
- package/build/js/dist/api-feedback.js.LICENSE.txt +45 -0
- package/build/js/dist/api-vendors.js +1 -1
- package/build/js/dist/api-vendors.js.LICENSE.txt +11 -9
- package/build/js/dist/src/locales/de-DE/common.json +995 -0
- package/build/js/dist/src/locales/en-UK/common.json +1061 -0
- package/build/js/dist/src/locales/es-ES/common.json +995 -0
- package/build/js/dist/src/locales/fr-FR/common.json +995 -0
- package/build/js/dist/src/locales/ja-JP/common.json +980 -0
- package/build/js/dist/src/locales/lt-LT/common.json +1025 -0
- package/build/js/dist/src/locales/nl-NL/common.json +995 -0
- package/build/js/dist/src/locales/pl-PL/common.json +1025 -0
- package/build/js/dist/src/locales/sv-SE/common.json +995 -0
- package/package.json +18 -1
- package/src/img/controls/attention.svg +1 -0
- package/src/locales/en-UK/common.json +79 -16
- package/src/react-api/ApiError/ApiError.js +119 -0
- package/src/react-api/ApiError/ApiError.test.js +43 -0
- package/src/react-api/ApiError/ApiError.test.page.js +107 -0
- package/src/react-api/ApiError/ApiError.test.stories.js +39 -0
- package/src/react-extension/ApiApp.js +17 -5
- package/src/react-extension/ExtApp.js +12 -5
- package/src/react-extension/ExtAuthenticationLogin.js +14 -12
- package/src/react-extension/ExtAuthenticationLogin.test.stories.js +59 -0
- package/src/react-extension/ExtBootstrapApp.js +1 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.js +24 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.data.js +3 -3
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.js +13 -1
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.page.js +7 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.js +101 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.data.js +23 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.stories.js +27 -0
- package/src/react-extension/components/Administration/ConfirmSaveAccountRecoverySettings/ConfirmSaveAccountRecoverySettings.js +1 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.js +78 -2
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.data.js +3 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.js +60 -0
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.page.js +23 -4
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationInternationalisationActions/DisplayAdministrationInternationalisationActions.js +125 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationMfaActions/DisplayAdministrationMfaActions.js +131 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSelfRegistrationActions/DisplayAdministrationSelfRegistrationActions.js +103 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSsoActions/DisplayAdministrationSsoActions.js +91 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSubscriptionActions/DisplayAdministrationSubscriptionActions.js +85 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationUserDirectoryActions/DisplayAdministrationUserDirectoryActions.js +228 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.js +4 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.test.js +9 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.js +3 -3
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.data.js +14 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.page.js +0 -17
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.js +18 -115
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.data.js +11 -13
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.js +38 -43
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.page.js +47 -10
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.stories.js +10 -43
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.js +82 -367
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.data.js +128 -42
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.js +75 -121
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.page.js +46 -16
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.stories.js +18 -14
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.js +103 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.js +53 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.page.js +81 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.stories.js +34 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.js +125 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.data.js +63 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.js +54 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.page.js +88 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.stories.js +35 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.js +381 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.data.js +69 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.js +332 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.page.js +247 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.stories.js +72 -0
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.js +19 -19
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.data.js +1717 -1729
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.js +41 -140
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.data.js +15 -3
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.js +22 -49
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.page.js +19 -11
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.stories.js +9 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.js +5 -6
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.data.js +1717 -1728
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.js +362 -835
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.data.js +427 -418
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.js +134 -175
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.page.js +108 -11
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.stories.js +17 -25
- package/src/react-extension/components/Administration/EditSubscriptionKey/EditSubscriptionKey.js +4 -2
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.js +3 -3
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.test.js +1 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.js +32 -7
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.data.js +0 -3
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.js +145 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.page.js +52 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.stories.js +15 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.js +340 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.data.js +56 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.js +223 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.page.js +235 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.stories.js +55 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/SsoProviders.data.js +34 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.js +12 -3
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.test.js +27 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/SelectAccountRecoveryOrganizationKey.test.page.js +8 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.js +197 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.data.js +37 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.js +187 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.page.js +120 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.stories.js +31 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.js +9 -5
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.js +11 -42
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.page.js +1 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.js +9 -5
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.js +16 -2
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.page.js +17 -1
- package/src/react-extension/components/AuthenticationLogin/Login/Login.js +177 -63
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.data.js +19 -11
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.js +93 -0
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.page.js +16 -0
- package/src/react-extension/components/AuthenticationLogin/OrchestrateLogin/OrchestrateLoginBoxMain.js +1 -0
- package/src/react-extension/components/AuthenticationSetup/SetupAuthentication/SetupAuthentication.js +4 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.js +119 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.js +43 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.page.js +108 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.stories.js +39 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/Autocomplete.test.js +12 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/AutocompleteItem.js +2 -2
- package/src/react-extension/components/Common/Legacy/HandleLegacyAppjs.js +1 -1
- package/src/react-extension/components/Common/Navigation/Header/Logo.js +13 -1
- package/src/react-extension/components/Resource/CreateResource/CreateResource.js +103 -30
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.js +44 -10
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.page.js +35 -7
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesList.js +3 -3
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesListContextualMenu.js +6 -5
- package/src/react-extension/components/Resource/DisplayResourcesWorkspace/DisplayResourcesWorkspaceMenu.js +5 -4
- package/src/react-extension/components/Resource/EditResource/EditResource.js +95 -23
- package/src/react-extension/components/Resource/EditResource/EditResource.test.js +45 -13
- package/src/react-extension/components/Resource/EditResource/EditResource.test.page.js +35 -2
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetails.js +2 -1
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetailsInformation.js +3 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.js +23 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.page.js +26 -2
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.js +22 -1
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.page.js +25 -2
- package/src/react-extension/components/ResourceFolderDetails/DisplayResourceFolderDetails/DisplayResourceFolderDetails.js +2 -1
- package/src/react-extension/components/ResourcePassword/GenerateResourcePassword/GenerateResourcePassword.js +2 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.js +14 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.js +8 -0
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.page.js +12 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.js +42 -3
- package/src/react-extension/components/User/CreateUser/CreateUser.test.js +16 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.test.page.js +26 -0
- package/src/react-extension/components/User/DisplayUserWorkspaceActions/DisplayUserWorkspaceActions.js +2 -1
- package/src/react-extension/components/User/DisplayUsersContextualMenu/DisplayUsersContextualMenu.js +5 -5
- package/src/react-extension/components/User/EditUser/EditUser.js +29 -2
- package/src/react-extension/components/User/EditUser/EditUser.test.js +12 -0
- package/src/react-extension/components/User/EditUser/EditUser.test.page.js +26 -0
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.js +2 -1
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.test.data.js +1332 -1331
- package/src/react-extension/components/UserDetails/DisplayUserDetailsPublicKey/DisplayUserDetailsPublicKey.js +2 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.js +19 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.js +9 -0
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.page.js +12 -0
- package/src/react-extension/components/UserGroup/DisplayUserGroupDetails/DisplayUserGroupDetails.js +2 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.js +16 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.js +8 -0
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.page.js +26 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/ConfirmPassphrase.js +1 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.js +6 -4
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.data.js +4 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.js +21 -11
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.page.js +10 -1
- package/src/react-extension/contexts/AdminSmtpSettingsContext.js +2 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.data.js +13 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.js +3 -1
- package/src/react-extension/contexts/AdminSsoContext.js +558 -0
- package/src/react-extension/contexts/AdminSsoContext.test.data.js +51 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.js +194 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.test.js +111 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.js +265 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.test.js +178 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.js +453 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.test.js +218 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.js +168 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.test.js +73 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.js +353 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.test.js +220 -0
- package/src/react-extension/contexts/AdministrationWorkspaceContext.js +17 -178
- package/src/react-extension/contexts/AdministrationWorkspaceContext.test.js +0 -26
- package/src/react-extension/contexts/ApiAppContext.test.data.js +4 -2
- package/src/react-extension/contexts/Authentication/AuthenticationLoginContext.js +11 -0
- package/src/react-extension/contexts/Authentication/AuthenticationSetupContext.js +1 -0
- package/src/react-extension/contexts/NavigationContext.js +34 -0
- package/src/react-extension/contexts/SsoContext.js +151 -0
- package/src/react-extension/lib/Domain/DomainUtil.js +70 -0
- package/src/react-extension/lib/Domain/DomainUtil.test.js +129 -0
- package/src/react-extension/lib/Domain/Domains.js +6113 -0
- package/src/react-extension/lib/Error/InputValidator.js +24 -0
- package/src/react-extension/lib/Map/DynamicRef.js +49 -0
- package/src/react-extension/lib/Map/DynamicRef.test.js +56 -0
- package/src/react-extension/lib/Map/MapObject.js +48 -0
- package/src/react-extension/lib/Map/MapObject.test.js +43 -0
- package/src/react-quickaccess/ExtQuickAccess.js +7 -4
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.js +3 -1
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.test.data.js +4 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.js +115 -4
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.data.js +10 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.stories.js +30 -3
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.js +33 -1
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.data.js +25 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.js +60 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.page.js +60 -0
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.js +33 -1
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.test.js +36 -7
- package/src/react-quickaccess/components/ResourceViewPage/ResourceViewPage.js +3 -2
- package/src/react-quickaccess/contexts/SsoContext.js +150 -0
- package/src/react-web-integration/lib/InForm/InFormFieldSelector.js +5 -0
- package/src/shared/constants/inputs.const.js +30 -0
- package/src/shared/lib/Browser/clipBoard.js +45 -0
- package/src/shared/lib/Browser/clipBoard.test.js +59 -0
- package/src/shared/models/Mfa/Duo.js +36 -0
- package/src/shared/models/Mfa/Duo.test.js +59 -0
- package/src/shared/models/Mfa/MfaDTO.js +51 -0
- package/src/shared/models/Mfa/MfaDTO.test.js +48 -0
- package/src/shared/models/Mfa/MfaEnumeration.js +17 -0
- package/src/shared/models/Mfa/MfaModel.js +48 -0
- package/src/shared/models/Mfa/MfaModel.test.js +37 -0
- package/src/shared/models/Mfa/Yubikey.js +35 -0
- package/src/shared/models/Mfa/Yubikey.test.js +47 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.js +55 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.test.js +37 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.js +42 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.test.js +48 -0
- package/src/shared/models/selfRegistration/SelfRegistrationEnumeration.js +17 -0
- package/src/shared/models/subscription/SubscriptionDto.js +34 -0
- package/src/shared/models/subscription/SubscriptionDto.test.js +31 -0
- package/src/shared/models/subscription/SubscriptionModel.js +33 -0
- package/src/shared/models/subscription/SubscriptionModel.test.js +48 -0
- package/src/shared/models/user/UserModel.js +37 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.js +57 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.test.js +40 -0
- package/src/shared/models/userDirectory/UserDirectoryEnum.js +22 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.js +64 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.test.js +37 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.js +69 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.test.js +73 -0
- package/src/shared/services/api/Internationalisation/InternationalisationService.js +46 -0
- package/src/shared/services/api/Mfa/MfaService.js +54 -0
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ApiAppAccountRecoveryUserService.js +2 -2
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ExtAppAccountRecoveryUserService.js +0 -0
- package/src/shared/services/api/secrets/pownedService.js +64 -0
- package/src/shared/services/api/secrets/pownedService.test.js +63 -0
- package/src/shared/services/api/selfRegistration/selfRegistrationService.js +64 -0
- package/src/shared/services/api/user/UserService.js +45 -0
- package/src/shared/services/api/userDirectory/UserDirectoryService.js +108 -0
- package/src/shared/services/forms/Mfa/MfaFormService.js +195 -0
- package/src/shared/services/forms/Mfa/MfaFormService.test.js +341 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.js +92 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.test.js +101 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.js +118 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.test.js +128 -0
- package/.gitlab-ci-local/.gitignore +0 -2
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.js +0 -205
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.data.js +0 -37
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.js +0 -197
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.page.js +0 -133
package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.page.js
CHANGED
|
@@ -151,13 +151,29 @@ export default class CreateGpgKeyPage {
|
|
|
151
151
|
return Boolean(this._page.container.querySelector('#import-key-link'));
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Returns the list item concerning the 'not in dictionnary" hints
|
|
157
|
+
*/
|
|
158
|
+
get notInDictionaryHint() {
|
|
159
|
+
return this._page.container.querySelectorAll(".password-hints li")[4];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Returns the tooltip for service unavailable for powned password
|
|
164
|
+
*/
|
|
165
|
+
get tootltip() {
|
|
166
|
+
return this._page.container.querySelector(".password-hints .unavailable .tooltip .tooltip-text");
|
|
167
|
+
}
|
|
168
|
+
|
|
154
169
|
/**
|
|
155
170
|
* Change the passphrase input value
|
|
156
171
|
* @param passphrase The new passphrase
|
|
157
172
|
*/
|
|
158
173
|
async fill(passphrase) {
|
|
159
174
|
fireEvent.change(this.passphraseInput, {target: {value: passphrase}});
|
|
160
|
-
|
|
175
|
+
jest.runAllTimers();
|
|
176
|
+
await waitFor(() => {});
|
|
161
177
|
}
|
|
162
178
|
|
|
163
179
|
/**
|
|
@@ -17,6 +17,8 @@ import UserAvatar from "../../Common/Avatar/UserAvatar";
|
|
|
17
17
|
import {Trans, withTranslation} from "react-i18next";
|
|
18
18
|
import {withAppContext} from "../../../contexts/AppContext";
|
|
19
19
|
import Password from "../../../../shared/components/Password/Password";
|
|
20
|
+
import {withSso} from "../../../contexts/SsoContext";
|
|
21
|
+
import SsoProviders from "../../Administration/ManageSsoSettings/SsoProviders.data";
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* The component display variations.
|
|
@@ -57,7 +59,10 @@ class Login extends Component {
|
|
|
57
59
|
emptyPassphrase: false, // True if the passphrase is empty
|
|
58
60
|
invalidPassphrase: false, // True if the passphrase is invalid
|
|
59
61
|
invalidGpgKey: false, // True if the gpg key is invalid
|
|
60
|
-
}
|
|
62
|
+
},
|
|
63
|
+
isSsoAvailable: false, // true if the current user has an SSO kit built locally
|
|
64
|
+
displaySso: false, // true if the UI should display the SSO login button
|
|
65
|
+
isLoaded: false, // true when the data is loaded
|
|
61
66
|
};
|
|
62
67
|
}
|
|
63
68
|
|
|
@@ -123,6 +128,9 @@ class Login extends Component {
|
|
|
123
128
|
this.handleSubmit = this.handleSubmit.bind(this);
|
|
124
129
|
this.handleChangePassphrase = this.handleChangePassphrase.bind(this);
|
|
125
130
|
this.handleToggleRememberMe = this.handleToggleRememberMe.bind(this);
|
|
131
|
+
this.handleSwitchToSso = this.handleSwitchToSso.bind(this);
|
|
132
|
+
this.handleSwitchToPassphrase = this.handleSwitchToPassphrase.bind(this);
|
|
133
|
+
this.handleSignInWithSso = this.handleSignInWithSso.bind(this);
|
|
126
134
|
}
|
|
127
135
|
|
|
128
136
|
/**
|
|
@@ -135,8 +143,17 @@ class Login extends Component {
|
|
|
135
143
|
/**
|
|
136
144
|
* Whenever the component is mounted
|
|
137
145
|
*/
|
|
138
|
-
componentDidMount() {
|
|
139
|
-
this.
|
|
146
|
+
async componentDidMount() {
|
|
147
|
+
await this.props.ssoContext.loadSsoConfiguration();
|
|
148
|
+
const isSsoAvailable = this.props.ssoContext.hasUserAnSsoKit();
|
|
149
|
+
this.setState({
|
|
150
|
+
isLoaded: true,
|
|
151
|
+
isSsoAvailable: isSsoAvailable,
|
|
152
|
+
displaySso: isSsoAvailable,
|
|
153
|
+
});
|
|
154
|
+
if (!isSsoAvailable) {
|
|
155
|
+
this.focusOnPassphrase();
|
|
156
|
+
}
|
|
140
157
|
}
|
|
141
158
|
|
|
142
159
|
/**
|
|
@@ -251,8 +268,51 @@ class Login extends Component {
|
|
|
251
268
|
/**
|
|
252
269
|
* Toggle the processing mode
|
|
253
270
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
271
|
+
toggleProcessing() {
|
|
272
|
+
this.setState({actions: {processing: !this.state.actions.processing}});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Switches the UI to the SSO mode.
|
|
277
|
+
*/
|
|
278
|
+
handleSwitchToSso(event) {
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
this.setState({displaySso: true});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Switches the UI to the passphrase mode.
|
|
285
|
+
*/
|
|
286
|
+
handleSwitchToPassphrase(event) {
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
this.setState({displaySso: false});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Handle the click on the SSO login button.
|
|
293
|
+
* @returns {Promise<void>}
|
|
294
|
+
*/
|
|
295
|
+
async handleSignInWithSso(event) {
|
|
296
|
+
event.preventDefault();
|
|
297
|
+
this.setState({actions: {
|
|
298
|
+
processing: true
|
|
299
|
+
}});
|
|
300
|
+
try {
|
|
301
|
+
await this.props.ssoContext.runSignInProcess();
|
|
302
|
+
} catch (e) {
|
|
303
|
+
if (e.name === "UserClosedSsoPopUpError") {
|
|
304
|
+
this.setState({
|
|
305
|
+
displaySso: false
|
|
306
|
+
});
|
|
307
|
+
} else {
|
|
308
|
+
this.props.onSsoLoginError(e);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
this.setState({
|
|
312
|
+
actions: {
|
|
313
|
+
processing: false
|
|
314
|
+
}
|
|
315
|
+
});
|
|
256
316
|
}
|
|
257
317
|
|
|
258
318
|
/**
|
|
@@ -267,12 +327,37 @@ class Login extends Component {
|
|
|
267
327
|
};
|
|
268
328
|
}
|
|
269
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Returns true if SSO is enabled and configured for Azure.
|
|
332
|
+
* @return {bool}
|
|
333
|
+
*/
|
|
334
|
+
get isAzureSsoEnabled() {
|
|
335
|
+
const ssoProvider = this.props.ssoContext.getProvider();
|
|
336
|
+
return ssoProvider === "azure";
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Returns the provider information of the current SSO provider configured.
|
|
341
|
+
* @return {object}
|
|
342
|
+
*/
|
|
343
|
+
get ssoProviderData() {
|
|
344
|
+
const ssoProvider = this.props.ssoContext.getProvider();
|
|
345
|
+
if (!ssoProvider) {
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
return SsoProviders.find(provider => provider.id === ssoProvider);
|
|
349
|
+
}
|
|
350
|
+
|
|
270
351
|
/**
|
|
271
352
|
* Render the component
|
|
272
353
|
*/
|
|
273
354
|
render() {
|
|
274
355
|
const processingClassName = this.isProcessing ? 'processing' : '';
|
|
275
356
|
const securityToken = this.securityToken;
|
|
357
|
+
const ssoProviderData = this.ssoProviderData;
|
|
358
|
+
if (!this.state.isLoaded) {
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
276
361
|
|
|
277
362
|
return (
|
|
278
363
|
<div className="login">
|
|
@@ -281,68 +366,95 @@ class Login extends Component {
|
|
|
281
366
|
<p className="login-user-name">{this.fullname}</p>
|
|
282
367
|
<p className="login-user-email">{this.username}</p>
|
|
283
368
|
</div>
|
|
369
|
+
{!this.state.displaySso &&
|
|
370
|
+
<form acceptCharset="utf-8" onSubmit={this.handleSubmit} className="enter-passphrase">
|
|
371
|
+
<div className={`input-password-wrapper input required ${this.hasErrors ? "error" : ""}`}>
|
|
372
|
+
<label htmlFor="passphrase">
|
|
373
|
+
<Trans>Passphrase</Trans>
|
|
374
|
+
</label>
|
|
375
|
+
<Password
|
|
376
|
+
id="passphrase"
|
|
377
|
+
autoComplete="off"
|
|
378
|
+
inputRef={this.passphraseInputRef}
|
|
379
|
+
name="passphrase"
|
|
380
|
+
placeholder={this.props.t('Passphrase')}
|
|
381
|
+
value={this.state.passphrase}
|
|
382
|
+
onChange={this.handleChangePassphrase}
|
|
383
|
+
disabled={!this.areActionsAllowed}
|
|
384
|
+
preview={true}
|
|
385
|
+
securityToken={securityToken}/>
|
|
386
|
+
{this.state.hasBeenValidated &&
|
|
387
|
+
<>
|
|
388
|
+
{this.state.errors.emptyPassphrase &&
|
|
389
|
+
<div className="empty-passphrase error-message"><Trans>The passphrase should not be empty.</Trans></div>
|
|
390
|
+
}
|
|
391
|
+
{this.state.errors.invalidPassphrase &&
|
|
392
|
+
<div className="invalid-passphrase error-message">
|
|
393
|
+
<Trans>The passphrase is invalid.</Trans> {this.state.isSsoAvailable && <a onClick={this.props.onSecondaryActionClick}><Trans>Do you need help?</Trans></a>}
|
|
394
|
+
</div>
|
|
395
|
+
}
|
|
396
|
+
{this.state.errors.invalidGpgKey &&
|
|
397
|
+
<div className="invalid-gpg-key error-message"><Trans>The private key is invalid.</Trans></div>
|
|
398
|
+
}
|
|
399
|
+
</>
|
|
400
|
+
}
|
|
401
|
+
</div>
|
|
402
|
+
{this.props.canRememberMe &&
|
|
403
|
+
<div className="input checkbox">
|
|
404
|
+
<input
|
|
405
|
+
id="remember-me"
|
|
406
|
+
type="checkbox"
|
|
407
|
+
name="remember-me"
|
|
408
|
+
value={this.state.rememberMe}
|
|
409
|
+
onChange={this.handleToggleRememberMe}
|
|
410
|
+
disabled={!this.areActionsAllowed}/>
|
|
411
|
+
<label htmlFor="remember-me">
|
|
412
|
+
<Trans>Remember until signed out.</Trans>
|
|
413
|
+
</label>
|
|
414
|
+
</div>
|
|
415
|
+
}
|
|
284
416
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
securityToken={securityToken}/>
|
|
301
|
-
{this.state.hasBeenValidated &&
|
|
302
|
-
<>
|
|
303
|
-
{this.state.errors.emptyPassphrase &&
|
|
304
|
-
<div className="empty-passphrase error-message"><Trans>The passphrase should not be empty.</Trans></div>
|
|
417
|
+
<div className="form-actions">
|
|
418
|
+
<button
|
|
419
|
+
type="submit"
|
|
420
|
+
className={`button primary big full-width ${processingClassName}`}
|
|
421
|
+
role="button"
|
|
422
|
+
disabled={this.isProcessing}>
|
|
423
|
+
{{
|
|
424
|
+
[LoginVariations.SIGN_IN]: <Trans>Sign in</Trans>,
|
|
425
|
+
[LoginVariations.ACCOUNT_RECOVERY]: <Trans>Complete recovery</Trans>,
|
|
426
|
+
}[this.props.displayAs]}
|
|
427
|
+
</button>
|
|
428
|
+
{this.state.isSsoAvailable &&
|
|
429
|
+
<a className="switchToSso" onClick={this.handleSwitchToSso}>
|
|
430
|
+
<Trans>Sign in with Single Sign-On.</Trans>
|
|
431
|
+
</a>
|
|
305
432
|
}
|
|
306
|
-
{this.state.
|
|
307
|
-
|
|
433
|
+
{!this.state.isSsoAvailable &&
|
|
434
|
+
<a onClick={this.props.onSecondaryActionClick}>
|
|
435
|
+
<Trans>Help, I lost my passphrase.</Trans>
|
|
436
|
+
</a>
|
|
308
437
|
}
|
|
309
|
-
|
|
310
|
-
|
|
438
|
+
</div>
|
|
439
|
+
</form>
|
|
440
|
+
}
|
|
441
|
+
{this.state.displaySso &&
|
|
442
|
+
<>
|
|
443
|
+
<div className="form-actions sso-login-form">
|
|
444
|
+
{this.isAzureSsoEnabled &&
|
|
445
|
+
<a className={`button sso-login-button ${this.isProcessing ? "disabled" : ""} ${ssoProviderData.id}`} onClick={this.handleSignInWithSso} disabled={this.isProcessing} >
|
|
446
|
+
<span className="provider-logo">
|
|
447
|
+
{ssoProviderData.icon}
|
|
448
|
+
</span>
|
|
449
|
+
{this.props.t(`Sign in with {{providerName}}`, {providerName: ssoProviderData.name})}
|
|
450
|
+
</a>
|
|
311
451
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
{this.props.canRememberMe &&
|
|
316
|
-
<div className="input checkbox">
|
|
317
|
-
<input
|
|
318
|
-
id="remember-me"
|
|
319
|
-
type="checkbox"
|
|
320
|
-
name="remember-me"
|
|
321
|
-
value={this.state.rememberMe}
|
|
322
|
-
onChange={this.handleToggleRememberMe}
|
|
323
|
-
disabled={!this.areActionsAllowed}/>
|
|
324
|
-
<label htmlFor="remember-me">
|
|
325
|
-
<Trans>Remember until signed out.</Trans>
|
|
326
|
-
</label>
|
|
452
|
+
<a onClick={this.handleSwitchToPassphrase}>
|
|
453
|
+
<Trans>Sign in with my passphrase.</Trans>
|
|
454
|
+
</a>
|
|
327
455
|
</div>
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
<div className="form-actions">
|
|
331
|
-
<button
|
|
332
|
-
type="submit"
|
|
333
|
-
className={`button primary big full-width ${processingClassName}`}
|
|
334
|
-
role="button"
|
|
335
|
-
disabled={this.isProcessing}>
|
|
336
|
-
{{
|
|
337
|
-
[LoginVariations.SIGN_IN]: <Trans>Sign in</Trans>,
|
|
338
|
-
[LoginVariations.ACCOUNT_RECOVERY]: <Trans>Complete recovery</Trans>,
|
|
339
|
-
}[this.props.displayAs]}
|
|
340
|
-
</button>
|
|
341
|
-
<a onClick={this.props.onSecondaryActionClick}>
|
|
342
|
-
<Trans>Help, I lost my passphrase.</Trans>
|
|
343
|
-
</a>
|
|
344
|
-
</div>
|
|
345
|
-
</form>
|
|
456
|
+
</>
|
|
457
|
+
}
|
|
346
458
|
</div>
|
|
347
459
|
);
|
|
348
460
|
}
|
|
@@ -358,12 +470,14 @@ Login.propTypes = {
|
|
|
358
470
|
LoginVariations.ACCOUNT_RECOVERY,
|
|
359
471
|
]), // Defines how the form should be displayed and behaves
|
|
360
472
|
context: PropTypes.any, // The application context
|
|
473
|
+
ssoContext: PropTypes.object, // The SSO context
|
|
361
474
|
account: PropTypes.object, // The user account
|
|
362
475
|
userSettings: PropTypes.object, // The user settings
|
|
363
476
|
canRememberMe: PropTypes.bool, // True if the remember me flag must be displayed
|
|
364
477
|
onSignIn: PropTypes.func.isRequired, // Callback to trigger whenever the user wants to sign-in
|
|
365
478
|
onCheckPassphrase: PropTypes.func.isRequired, // Callback to trigger whenever the user wants to check the passphrase
|
|
366
479
|
onSecondaryActionClick: PropTypes.func, // Callback to trigger when the user clicks on the secondary action link.
|
|
480
|
+
onSsoLoginError: PropTypes.func, // Callback when an error during SSO login happened
|
|
367
481
|
t: PropTypes.func, // The translation function
|
|
368
482
|
};
|
|
369
|
-
export default withAppContext(withTranslation('common')(Login));
|
|
483
|
+
export default withAppContext(withSso(withTranslation('common')(Login)));
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import {LoginVariations} from "./Login";
|
|
16
16
|
import UserSettings from "../../../../shared/lib/Settings/UserSettings";
|
|
17
|
+
import {defaultAppContext} from "../../../contexts/ExtAppContext.test.data";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Default props
|
|
@@ -21,22 +22,29 @@ import UserSettings from "../../../../shared/lib/Settings/UserSettings";
|
|
|
21
22
|
* @returns {Object}
|
|
22
23
|
*/
|
|
23
24
|
export function defaultProps(props = {}) {
|
|
25
|
+
const userSettings = new UserSettings({
|
|
26
|
+
"user.settings.securityToken.code": "TST",
|
|
27
|
+
"user.settings.securityToken.color": "#f44336",
|
|
28
|
+
"user.settings.securityToken.textColor": "#ffffff",
|
|
29
|
+
"user.settings.trustedDomain": (new URL(window.location.href)).origin,
|
|
30
|
+
"user.id": "d57c10f5-639d-5160-9c81-8a0c6c4ec856",
|
|
31
|
+
"user.username": "admin@passbolt.com",
|
|
32
|
+
"user.firstname": "Admin",
|
|
33
|
+
"user.lastname": "User",
|
|
34
|
+
"user.settings.locale": "fr-FR"
|
|
35
|
+
});
|
|
24
36
|
const defaultProps = {
|
|
25
37
|
displayAs: LoginVariations.SIGN_IN,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"user.settings.securityToken.color": "#f44336",
|
|
29
|
-
"user.settings.securityToken.textColor": "#ffffff",
|
|
30
|
-
"user.settings.trustedDomain": (new URL(window.location.href)).origin,
|
|
31
|
-
"user.id": "d57c10f5-639d-5160-9c81-8a0c6c4ec856",
|
|
32
|
-
"user.username": "admin@passbolt.com",
|
|
33
|
-
"user.firstname": "Admin",
|
|
34
|
-
"user.lastname": "User",
|
|
35
|
-
"user.settings.locale": "fr-FR"
|
|
36
|
-
}),
|
|
38
|
+
context: defaultAppContext({userSettings}),
|
|
39
|
+
userSettings: userSettings,
|
|
37
40
|
onSignIn: jest.fn(() => Promise.resolve()),
|
|
38
41
|
onCheckPassphrase: jest.fn(() => Promise.resolve()),
|
|
39
42
|
onSecondaryActionClick: jest.fn(() => Promise.resolve()),
|
|
43
|
+
ssoContext: {
|
|
44
|
+
loadSsoConfiguration: () => Promise.resolve(),
|
|
45
|
+
hasUserAnSsoKit: () => false,
|
|
46
|
+
getProvider: () => null,
|
|
47
|
+
}
|
|
40
48
|
};
|
|
41
49
|
return Object.assign(defaultProps, props);
|
|
42
50
|
}
|
|
@@ -19,6 +19,7 @@ import each from "jest-each";
|
|
|
19
19
|
import LoginPage from "./Login.test.page";
|
|
20
20
|
import {LoginVariations} from "./Login";
|
|
21
21
|
import {defaultProps} from "./Login.test.data";
|
|
22
|
+
import {waitFor} from "@testing-library/dom";
|
|
22
23
|
|
|
23
24
|
beforeEach(() => {
|
|
24
25
|
jest.resetModules();
|
|
@@ -33,6 +34,8 @@ describe("Login", () => {
|
|
|
33
34
|
const props = defaultProps(_props);
|
|
34
35
|
const page = new LoginPage(props);
|
|
35
36
|
|
|
37
|
+
await waitFor(() => {});
|
|
38
|
+
|
|
36
39
|
expect.assertions(2);
|
|
37
40
|
const expectedPassphrase = "some passphrase";
|
|
38
41
|
await page.fillPassphrase(expectedPassphrase);
|
|
@@ -45,6 +48,8 @@ describe("Login", () => {
|
|
|
45
48
|
const props = defaultProps({..._props, canRememberMe: false});
|
|
46
49
|
const page = new LoginPage(props);
|
|
47
50
|
|
|
51
|
+
await waitFor(() => {});
|
|
52
|
+
|
|
48
53
|
expect.assertions(2);
|
|
49
54
|
expect(page.canRememberMe).toBeFalsy();
|
|
50
55
|
const expectedPassphrase = "some passphrase";
|
|
@@ -57,6 +62,8 @@ describe("Login", () => {
|
|
|
57
62
|
const props = defaultProps({..._props, canRememberMe: true});
|
|
58
63
|
const page = new LoginPage(props);
|
|
59
64
|
|
|
65
|
+
await waitFor(() => {});
|
|
66
|
+
|
|
60
67
|
expect.assertions(2);
|
|
61
68
|
expect(page.canRememberMe).toBeTruthy();
|
|
62
69
|
const expectedPassphrase = "some passphrase";
|
|
@@ -70,6 +77,8 @@ describe("Login", () => {
|
|
|
70
77
|
const props = defaultProps({..._props});
|
|
71
78
|
const page = new LoginPage(props);
|
|
72
79
|
|
|
80
|
+
await waitFor(() => {});
|
|
81
|
+
|
|
73
82
|
expect.assertions(1);
|
|
74
83
|
await page.clickSecondaryActionLink();
|
|
75
84
|
expect(props.onSecondaryActionClick).toHaveBeenCalled();
|
|
@@ -81,6 +90,8 @@ describe("Login", () => {
|
|
|
81
90
|
const props = defaultProps({..._props, onSignIn});
|
|
82
91
|
const page = new LoginPage(props);
|
|
83
92
|
|
|
93
|
+
await waitFor(() => {});
|
|
94
|
+
|
|
84
95
|
expect.hasAssertions();
|
|
85
96
|
const inProgressFn = () => {
|
|
86
97
|
expect(page.canChange).toBeFalsy();
|
|
@@ -98,6 +109,8 @@ describe("Login", () => {
|
|
|
98
109
|
const props = defaultProps({..._props, onSignIn});
|
|
99
110
|
const page = new LoginPage(props);
|
|
100
111
|
|
|
112
|
+
await waitFor(() => {});
|
|
113
|
+
|
|
101
114
|
expect.hasAssertions();
|
|
102
115
|
const inProgressFn = () => {
|
|
103
116
|
expect(page.isProcessing).toBeTruthy();
|
|
@@ -113,6 +126,8 @@ describe("Login", () => {
|
|
|
113
126
|
const props = defaultProps(_props);
|
|
114
127
|
const page = new LoginPage(props);
|
|
115
128
|
|
|
129
|
+
await waitFor(() => {});
|
|
130
|
+
|
|
116
131
|
expect.assertions(1);
|
|
117
132
|
const emptyPassphrase = ' ';
|
|
118
133
|
await page.fillPassphrase(emptyPassphrase);
|
|
@@ -126,6 +141,8 @@ describe("Login", () => {
|
|
|
126
141
|
const props = defaultProps({..._props, onCheckPassphrase});
|
|
127
142
|
const page = new LoginPage(props);
|
|
128
143
|
|
|
144
|
+
await waitFor(() => {});
|
|
145
|
+
|
|
129
146
|
expect.assertions(1);
|
|
130
147
|
await page.fillPassphrase('some passphrase');
|
|
131
148
|
await page.signIn();
|
|
@@ -138,6 +155,8 @@ describe("Login", () => {
|
|
|
138
155
|
const props = defaultProps({displayAs: LoginVariations.SIGN_IN});
|
|
139
156
|
const page = new LoginPage(props);
|
|
140
157
|
|
|
158
|
+
await waitFor(() => {});
|
|
159
|
+
|
|
141
160
|
expect.assertions(2);
|
|
142
161
|
expect(page.signInButton.textContent).toBe("Sign in");
|
|
143
162
|
expect(page.secondaryActionLink.textContent).toBe("Help, I lost my passphrase.");
|
|
@@ -149,9 +168,83 @@ describe("Login", () => {
|
|
|
149
168
|
const props = defaultProps({displayAs: LoginVariations.ACCOUNT_RECOVERY});
|
|
150
169
|
const page = new LoginPage(props);
|
|
151
170
|
|
|
171
|
+
await waitFor(() => {});
|
|
172
|
+
|
|
152
173
|
expect.assertions(2);
|
|
153
174
|
expect(page.signInButton.textContent).toBe("Complete recovery");
|
|
154
175
|
expect(page.secondaryActionLink.textContent).toBe("Help, I lost my passphrase.");
|
|
155
176
|
});
|
|
156
177
|
});
|
|
178
|
+
|
|
179
|
+
describe("As a registered user I can use the SSO feature to sign in to passbolt", () => {
|
|
180
|
+
it('As AN I cannot see the SSO login button if I do not have an SSO kit set on my browser profile', async() => {
|
|
181
|
+
expect.assertions(3);
|
|
182
|
+
const props = defaultProps({
|
|
183
|
+
displayAs: LoginVariations.SIGN_IN,
|
|
184
|
+
ssoContext: {
|
|
185
|
+
getProvider: () => null,
|
|
186
|
+
loadSsoConfiguration: jest.fn(),
|
|
187
|
+
hasUserAnSsoKit: jest.fn().mockImplementation(() => false)
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
const page = new LoginPage(props);
|
|
192
|
+
await waitFor(() => {});
|
|
193
|
+
|
|
194
|
+
expect(props.ssoContext.loadSsoConfiguration).toHaveBeenCalledTimes(1);
|
|
195
|
+
expect(props.ssoContext.hasUserAnSsoKit).toHaveBeenCalledTimes(1);
|
|
196
|
+
expect(page.secondaryActionLink.textContent).toStrictEqual("Help, I lost my passphrase.");
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it('As AN I can see the SSO login button if I have an SSO kit set on my browser profile', async() => {
|
|
200
|
+
expect.assertions(3);
|
|
201
|
+
const props = defaultProps({
|
|
202
|
+
displayAs: LoginVariations.SIGN_IN,
|
|
203
|
+
ssoContext: {
|
|
204
|
+
getProvider: () => "azure",
|
|
205
|
+
loadSsoConfiguration: jest.fn(),
|
|
206
|
+
hasUserAnSsoKit: jest.fn().mockImplementation(() => true)
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const page = new LoginPage(props);
|
|
211
|
+
await waitFor(() => {});
|
|
212
|
+
|
|
213
|
+
expect(page.azureLoginButton).toBeTruthy();
|
|
214
|
+
|
|
215
|
+
expect(props.ssoContext.loadSsoConfiguration).toHaveBeenCalledTimes(1);
|
|
216
|
+
expect(props.ssoContext.hasUserAnSsoKit).toHaveBeenCalledTimes(1);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it('As AN I can use the SSO login feature to sign in to Passbolt', async() => {
|
|
220
|
+
expect.assertions(4);
|
|
221
|
+
|
|
222
|
+
let signInPromiseResolver = null;
|
|
223
|
+
const props = defaultProps({
|
|
224
|
+
displayAs: LoginVariations.SIGN_IN,
|
|
225
|
+
ssoContext: {
|
|
226
|
+
getProvider: () => "azure",
|
|
227
|
+
loadSsoConfiguration: jest.fn(),
|
|
228
|
+
hasUserAnSsoKit: jest.fn().mockImplementation(() => true),
|
|
229
|
+
runSignInProcess: jest.fn().mockImplementation(() => new Promise(resolve => {
|
|
230
|
+
signInPromiseResolver = resolve;
|
|
231
|
+
})),
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
const page = new LoginPage(props);
|
|
236
|
+
await waitFor(() => {});
|
|
237
|
+
|
|
238
|
+
expect(page.azureLoginButton).toBeTruthy();
|
|
239
|
+
|
|
240
|
+
await page.clickOnSsoLogin();
|
|
241
|
+
expect(page.azureLoginButton.classList.contains('disabled')).toBeTruthy();
|
|
242
|
+
|
|
243
|
+
expect(props.ssoContext.runSignInProcess).toHaveBeenCalledTimes(1);
|
|
244
|
+
|
|
245
|
+
await signInPromiseResolver();
|
|
246
|
+
|
|
247
|
+
expect(page.azureLoginButton.classList.contains('disabled')).toBeFalsy();
|
|
248
|
+
});
|
|
249
|
+
});
|
|
157
250
|
});
|
|
@@ -86,6 +86,13 @@ export default class LoginPage {
|
|
|
86
86
|
return this._page.container.querySelector('.form-actions a');
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Returns the Azure SSO login button element
|
|
91
|
+
*/
|
|
92
|
+
get azureLoginButton() {
|
|
93
|
+
return this._page.container.querySelector('.sso-login-form .sso-login-button');
|
|
94
|
+
}
|
|
95
|
+
|
|
89
96
|
/**
|
|
90
97
|
* Returns true if the user can change something like the token code
|
|
91
98
|
*/
|
|
@@ -152,4 +159,13 @@ export default class LoginPage {
|
|
|
152
159
|
fireEvent.click(this.secondaryActionLink, leftClick);
|
|
153
160
|
await waitFor(inProgressFn);
|
|
154
161
|
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Click on the secondary action link.
|
|
165
|
+
*/
|
|
166
|
+
async clickOnSsoLogin(inProgressFn = () => {}) {
|
|
167
|
+
const leftClick = {button: 0};
|
|
168
|
+
fireEvent.click(this.azureLoginButton, leftClick);
|
|
169
|
+
await waitFor(inProgressFn);
|
|
170
|
+
}
|
|
155
171
|
}
|
|
@@ -43,6 +43,7 @@ class OrchestrateLoginBoxMain extends Component {
|
|
|
43
43
|
onSignIn={this.props.authenticationLoginContext.signIn}
|
|
44
44
|
onCheckPassphrase={this.props.authenticationLoginContext.checkPassphrase}
|
|
45
45
|
onSecondaryActionClick={this.props.authenticationLoginContext.needHelpCredentialsLost}
|
|
46
|
+
onSsoLoginError={this.props.authenticationLoginContext.handleSsoLoginError}
|
|
46
47
|
/>;
|
|
47
48
|
case AuthenticationLoginWorkflowStates.ACCEPT_NEW_SERVER_KEY:
|
|
48
49
|
return <AcceptLoginServerKeyChange
|
|
@@ -79,6 +79,10 @@ class SetupAuthentication extends Component {
|
|
|
79
79
|
return <ChooseSecurityToken
|
|
80
80
|
onComplete={this.props.authenticationSetupContext.chooseSecurityToken}
|
|
81
81
|
/>;
|
|
82
|
+
case AuthenticationSetupWorkflowStates.CONFIGURING_SSO:
|
|
83
|
+
return <LoadingSpinner
|
|
84
|
+
title={<Trans>Configuring SSO access, please wait...</Trans>}
|
|
85
|
+
/>;
|
|
82
86
|
case AuthenticationSetupWorkflowStates.COMPLETING_SETUP:
|
|
83
87
|
return <LoadingSpinner
|
|
84
88
|
title={<Trans>Completing setup, please wait...</Trans>}
|