Cb 4268 force logout (#2549)

* CB-4703. Hide private ssl key, added new parameter to features

* CB-4631. Fix Build

* CB-4703. Hide private ssl key, added new parameter to features

* CB-4631. Fix Build

* CB-4631. Added logic

* CB-4728. Refactor after review

* CB-4268: adds too many session checkbox for local and federated authentication

* CB-4268 ux improve for force session dialog. do not close main popup if confirm dialog rejected

* CB-4268 cleanup

* CB-4268 adds too-many-sessions-plugin to close error of the external window while logging in

* CB-4268 cleanup

* CB-4268 cleanup

* CB-4268 auth dialog: removes unneeded state

* CB-4268. Add logic to force logout for federated users

* CB-4268. Added redirect for Federated users

* CB-4268. Update script

* CB-4268 split force session dialog checkbox for each tab its own instance

* CB-4268 set exceptions for each auth tab individually

* CB-4268 show error for all auth tabs

* CB-4268. Update script, refactor event for user

* CB-4268. Fixed force logout for sso

* CB-4268. Fixed class cast exception

* CB-4268. Refactor after review

* Revert "CB-4268 show error for all auth tabs"

This reverts commit 996bdfebdb.

* Revert "CB-4268 set exceptions for each auth tab individually"

This reverts commit dbeca03a31.

* Revert "CB-4268 split force session dialog checkbox for each tab its own instance"

This reverts commit cf79208d41.

* CB-4268 show error for all auth dialog tabs

* CB-4268 resets error state on auth dialog tab change

* CB-4268 fix: reset error state only on tab change

* CB-4268 auth login function cleanup

* CB-4268. Refactor after review, cleanup code

* CB-4268 removes too-many-sessions plugin

* CB-4268 removes unneeded translations

* CB-4268 fix: show login button only for non federated auth tabs

* CB-4268 refactor: reset error on switching auth mode

* CB-4268 stop resetting error with flag for auth dialog

* CB-4268 stop resetting error with flag for auth dialog (reset error default true)

* CB-4268 rename to ssoError.html

* CB-4268. Rename parameter for html

* CB-4268. Revert

* CB-4854. Refactor after review

* CB-4854. Refactor after review

* CB-4268 adds tooltip for force logout checkbox

* CB-4268 changes force sessions popup title to shorter version

---------

Co-authored-by: sergeyteleshev <iamsergeyteleshev@gmail.com>
Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
DenisSinelnikov
2024-04-25 13:20:24 +00:00
committed by GitHub
co-authored by sergeyteleshev Evgenia Bezborodova
parent 426650076a
commit b701d21d89
36 changed files with 511 additions and 129 deletions
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
const { resolve } = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
@@ -13,6 +20,7 @@ const HtmlInjectWebpackPlugin = require('../utils/HtmlInjectWebpackPlugin.js');
const main = resolve('dist/index.js');
const sso = require.resolve('@cloudbeaver/plugin-sso/dist/index.js');
const ssoHtmlTemplate = require.resolve('@cloudbeaver/plugin-sso/src/index.html.ejs');
const ssoErrorHtmlTemplate = require.resolve('@cloudbeaver/plugin-sso/src/ssoError.html.ejs');
const outputDir = resolve('lib');
const package = require(resolve('package.json'));
const { getServiceWorkerSource } = require('./webpack.product.utils.js');
@@ -98,6 +106,14 @@ module.exports = (env, argv) => {
version: timestampVersion,
title: package.product?.name,
}),
new HtmlWebpackPlugin({
filename: 'ssoError.html',
template: ssoErrorHtmlTemplate,
inject: 'body',
chunks: ['sso'],
version: timestampVersion,
title: package.product?.name,
}),
new HtmlInjectWebpackPlugin({
body: [{ attributes: { hidden: true }, tagName: 'object', innerHTML: '{STATIC_CONTENT}', voidTag: false }],
}),
@@ -16,6 +16,7 @@ const commonConfig = require('./webpack.config.js');
const index = resolve('dist/index.js');
const sso = require.resolve('@cloudbeaver/plugin-sso/dist/index.js');
const ssoHtmlTemplate = require.resolve('@cloudbeaver/plugin-sso/src/index.html.ejs');
const ssoErrorHtmlTemplate = require.resolve('@cloudbeaver/plugin-sso/src/ssoError.html.ejs');
const { getAssets } = require('./webpack.product.utils');
const HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -126,6 +127,14 @@ module.exports = (env, argv) => {
version: package.version,
title: package.product?.name,
}),
new HtmlWebpackPlugin({
filename: 'ssoError.html',
template: ssoErrorHtmlTemplate,
inject: 'body',
chunks: ['sso'],
version: package.version,
title: package.product?.name,
}),
new HtmlInjectWebpackPlugin({
body: [{ attributes: { hidden: true }, tagName: 'object', innerHTML: '{STATIC_CONTENT}', voidTag: false }],
}),