Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/package.json
Jacob Overgaard 5ae631b223 Authentication using OpenID (#654)
* install app auth

* add service to handle auth

* add openid handling to general app

* move props to constructor

* update default api url to https

* add support for adjusting umbracoUrl from outside

* use origin url for redirect if empty from env

* merge origin/main

* merge origin/main

* add redirect uri support

* only check auth on firstUpdated

* merge origin/main

* fix redirect_uri

* listen for auth-success events before anything else

* save current route to restore after login

* set token function for all OpenAPI requests

* include credentials after login

* update openapi-typescript-codegen

* generate new models with bugfixes for CancelablePromise and request

* remove auth-success event

* wait with fetchServiceConfiguration until we actually need to query the server

* revert change where service configuration was delayed

* use LocalStorageBackend to save/restore token state

* improve documentation

* cleanup todos

* improve docs

* update documentation and set everything to private fields

* remove undefined

* add a token to provide server url

* add more docs

* provide the base url of the server through a token

* add more docs

* fix import

* allow to override the backoffice base url through a property

* use private modifier

* duplicate login image

* make generic error element to use as error page

* check for initialisation errors and show error page if necessary

* rename class to UmbAuthFlow

* control the notification manually with runtime status call

* add styling

* add stack to problemdetails

* forward all errors

* support problemdetails rendering

* allow passthrough without a token

* move error logic to function

* add support for BOOT_FAILED and default errors

* rename background img

* remove false character

* check for isMocking to simplify auth flow

* add support for generic ApiErrors

* make sure all errors from api controllers are ApiError or CancelError to be able to fine-tune the handling of them

* remove unused legacy method

* show notifications (for now) after session expiration

* break early on CancelErrors

* revert options argument

* remove login token after a 401 is detected

* catch api errors

* prefix class with Umb

* throw errors instead of using ProblemDetailsModel

* add TODO

* add TODO

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2023-04-24 12:27:25 +02:00

135 lines
4.8 KiB
JSON

{
"name": "umbraco-cms-backoffice",
"license": "MIT",
"private": true,
"version": "0.0.0",
"type": "module",
"main": "dist/main.js",
"exports": {
".": "./dist/main.js"
},
"types": "types/src/app.d.ts",
"files": [
"dist",
"types"
],
"repository": {
"url": "https://github.com/umbraco/Umbraco.CMS.Backoffice",
"type": "git"
},
"bugs": {
"url": "https://github.com/umbraco/Umbraco.CMS.Backoffice/issues"
},
"author": {
"name": "Umbraco A/S",
"email": "backoffice@umbraco.com",
"url": "https://umbraco.com"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build --mode staging",
"build:libs": "npm run wc-analyze && npm run wc-analyze:vscode && npm run generate:jsonschema && rollup -c rollup-libs.config.js && node utils/move-libs.js",
"build:for:static": "tsc && vite build",
"build:for:cms": "tsc && npm run build:libs && vite build -c vite.cms.config.ts",
"build:for:cms:watch": "tsc && npm run build:libs && vite build -c vite.cms.config.ts --watch",
"preview": "vite preview --open",
"test": "web-test-runner --coverage",
"test:watch": "web-test-runner --watch",
"auth:test:e2e": "npx playwright test --config apps/auth/",
"backoffice:test:e2e": "npx playwright test",
"test:e2e": "npm run auth:test:e2e && npm run backoffice:test:e2e",
"lint": "eslint src apps libs e2e",
"lint:errors": "npm run lint -- --quiet",
"lint:fix": "npm run lint -- --fix",
"format": "prettier 'src/**/*.ts'",
"format:fix": "npm run format -- --write",
"generate:api": "openapi --input https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v13/dev/src/Umbraco.Cms.Api.Management/OpenApi.json --output libs/backend-api/src --postfixServices Resource --useOptions",
"generate:api-dev": "openapi --input http://localhost:11000/umbraco/swagger/v1/swagger.json --output libs/backend-api/src --postfixServices Resource --useOptions",
"generate:jsonschema": "typescript-json-schema --required --include \"./libs/extensions-registry/*.ts\" --out dist/libs/umbraco-package-schema.json tsconfig.json UmbracoPackage",
"storybook": "npm run wc-analyze && storybook dev -p 6006",
"storybook:build": "npm run wc-analyze && storybook build",
"build-storybook": "npm run wc-analyze && storybook build",
"generate:icons": "node ./devops/icons/index.js",
"wc-analyze": "wca **/*.element.ts --outFile dist/libs/custom-elements.json",
"wc-analyze:vscode": "wca **/*.element.ts --format vscode --outFile dist/libs/vscode-html-custom-data.json",
"new-extension": "plop --plopfile ./devops/plop/plop.js",
"compile": "tsc",
"check": "npm run lint && npm run compile && npm run build-storybook"
},
"engines": {
"node": ">=18.14 <19",
"npm": ">=9.5 < 10"
},
"dependencies": {
"@openid/appauth": "^1.3.1",
"@umbraco-ui/uui": "^1.2.1",
"@umbraco-ui/uui-css": "^1.2.1",
"element-internals-polyfill": "^1.1.19",
"lit": "^2.7.0",
"lodash-es": "4.17.21",
"monaco-editor": "^0.36.1",
"router-slot": "file:router-slot-2.0.0.tgz",
"rxjs": "^7.8.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@mdx-js/react": "^2.2.1",
"@open-wc/testing": "^3.1.7",
"@playwright/test": "^1.30.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@storybook/addon-a11y": "^7.0.2",
"@storybook/addon-actions": "^7.0.2",
"@storybook/addon-essentials": "^7.0.2",
"@storybook/addon-links": "^7.0.2",
"@storybook/mdx2-csf": "^1.0.0",
"@storybook/web-components": "^7.0.2",
"@storybook/web-components-vite": "^7.0.2",
"@types/chai": "^4.3.4",
"@types/lodash-es": "^4.17.6",
"@types/mocha": "^10.0.0",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.57.0",
"@web/dev-server-esbuild": "^0.3.3",
"@web/dev-server-import-maps": "^0.0.7",
"@web/dev-server-rollup": "^0.3.21",
"@web/test-runner": "^0.15.0",
"@web/test-runner-playwright": "^0.9.0",
"babel-loader": "^9.1.2",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.4",
"eslint-plugin-lit": "^1.8.2",
"eslint-plugin-lit-a11y": "^2.3.0",
"eslint-plugin-local-rules": "^1.3.2",
"eslint-plugin-storybook": "^0.6.11",
"eslint-plugin-wc": "^1.4.0",
"msw": "^1.1.0",
"msw-storybook-addon": "^1.8.0",
"openapi-typescript-codegen": "^0.24.0",
"playwright-msw": "^2.1.0",
"plop": "^3.1.1",
"prettier": "2.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.10.0",
"rollup-plugin-dts": "^5.2.0",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-url": "^3.0.1",
"storybook": "^7.0.2",
"tiny-glob": "^0.2.9",
"typescript": "^5.0.3",
"typescript-json-schema": "^0.55.0",
"vite": "^4.3.1",
"vite-plugin-static-copy": "^0.14.0",
"vite-tsconfig-paths": "^4.2.0",
"web-component-analyzer": "^2.0.0-next.4"
},
"msw": {
"workerDirectory": "public"
}
}