@tsed/oidc-provider-plugin-wildcard-redirect-uri 7.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@tsed/oidc-provider-plugin-wildcard-redirect-uri",
3
+ "version": "7.21.0",
4
+ "description": "A plugin to support wildcard in the redirect uri whitelist",
5
+ "private": false,
6
+ "source": "./src/index.ts",
7
+ "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
9
+ "typings": "./lib/types/index.d.ts",
10
+ "exports": {
11
+ "types": "./lib/types/index.d.ts",
12
+ "import": "./lib/esm/index.js",
13
+ "require": "./lib/cjs/index.js",
14
+ "default": "./lib/esm/index.js"
15
+ },
16
+ "scripts": {
17
+ "build": "yarn barrels && yarn build:ts",
18
+ "start": "ts-node test/app/index.ts",
19
+ "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
20
+ "test": "cross-env NODE_ENV=test yarn jest --max-workers=2 && jest-coverage-thresholds-bumper",
21
+ "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json",
22
+ "lint": "eslint '**/*.{ts,js}'",
23
+ "lint:fix": "eslint '**/*.{ts,js}' --fix"
24
+ },
25
+ "dependencies": {
26
+ "wildcard": "2.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@tsed/core": "7.21.0",
30
+ "@tsed/di": "7.21.0",
31
+ "@tsed/eslint": "7.21.0",
32
+ "@tsed/oidc-provider": "7.21.0",
33
+ "@tsed/typescript": "7.21.0",
34
+ "@types/uuid": "8.3.4",
35
+ "eslint": "^8.12.0"
36
+ },
37
+ "peerDependencies": {
38
+ "@tsed/core": "^7.21.0",
39
+ "@tsed/di": "^7.21.0",
40
+ "@tsed/logger": ">=6.2.2",
41
+ "@tsed/oidc-provider": "^7.21.0",
42
+ "oidc-provider": ">=8.0.0"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@tsed/core": {
46
+ "optional": false
47
+ },
48
+ "@tsed/di": {
49
+ "optional": false
50
+ },
51
+ "@tsed/oidc-provider": {
52
+ "optional": false
53
+ }
54
+ },
55
+ "repository": "https://github.com/tsedio/tsed",
56
+ "bugs": {
57
+ "url": "https://github.com/tsedio/tsed/issues"
58
+ },
59
+ "homepage": "https://github.com/tsedio/tsed/tree/production/packages/security/oidc-provider-plugin-wildcard-redirect-uri",
60
+ "author": "Romain Lenzotti",
61
+ "license": "MIT"
62
+ }
package/readme.md ADDED
@@ -0,0 +1,98 @@
1
+ <p style="text-align: center" align="center">
2
+ <a href="https://tsed.io" target="_blank"><img src="https://tsed.io/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
3
+ </p>
4
+
5
+ <div align="center">
6
+ <h1>OIDC Provider - Wildcard redirect uri plugin</h1>
7
+
8
+ [![Build & Release](https://github.com/tsedio/tsed/workflows/Build%20&%20Release/badge.svg)](https://github.com/tsedio/tsed/actions?query=workflow%3A%22Build+%26+Release%22)
9
+ [![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tsedio/tsed/blob/master/CONTRIBUTING.md)
10
+ [![Coverage Status](https://coveralls.io/repos/github/tsedio/tsed/badge.svg?branch=production)](https://coveralls.io/github/tsedio/tsed?branch=production)
11
+ [![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon)
12
+ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
13
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
14
+ [![github](https://img.shields.io/static/v1?label=Github%20sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/romakita)
15
+ [![opencollective](https://img.shields.io/static/v1?label=OpenCollective%20sponsor&message=%E2%9D%A4&logo=OpenCollective&color=%23fe8e86)](https://opencollective.com/tsed)
16
+
17
+ </div>
18
+
19
+ <div align="center">
20
+ <a href="https://tsed.io/">Website</a>
21
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
22
+ <a href="https://tsed.io/getting-started/">Getting started</a>
23
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
24
+ <a href="https://api.tsed.io/rest/slack/tsedio/tsed">Slack</a>
25
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
26
+ <a href="https://twitter.com/TsED_io">Twitter</a>
27
+ </div>
28
+
29
+ <hr />
30
+
31
+ A package of Ts.ED framework. See website: https://tsed.io/tutorials/oidc-provider
32
+
33
+ ## Feature
34
+
35
+ Allow \* in the redirect_uri whitelist.
36
+
37
+ ⚠️⚠️⚠️ DO NOT ENABLE THIS PLUGIN in PRODUCTION MODE ⚠️⚠️⚠️
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ npm install --save @tsed/oidc-provider-plugin-wildcard-redirect-uri
43
+ ```
44
+
45
+ Then import `@tsed/oidc-provider-plugin-wildcard-redirect-uri` in your Server:
46
+
47
+ ```typescript
48
+ import {Configuration} from "@tsed/common";
49
+ import "@tsed/oidc-provider"; // import typeorm ts.ed module
50
+ import "@tsed/oidc-provider-plugin-wildcard-redirect-uri"; // import typeorm ts.ed module
51
+
52
+ @Configuration({
53
+ oidc: {
54
+ plugins: {
55
+ wildcard: {
56
+ enabled: process.env.NODE_ENV !== "production"
57
+ }
58
+ }
59
+ }
60
+ })
61
+ export class Server {}
62
+ ```
63
+
64
+ ## Contributors
65
+
66
+ Please read [contributing guidelines here](https://tsed.io/contributing.html)
67
+
68
+ <a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
69
+
70
+ ## Backers
71
+
72
+ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
73
+
74
+ <a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/backers.svg?width=890"></a>
75
+
76
+ ## Sponsors
77
+
78
+ Support this project by becoming a sponsor. Your logo will show up here with a link to your
79
+ website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
80
+
81
+ ## License
82
+
83
+ The MIT License (MIT)
84
+
85
+ Copyright (c) 2016 - 2022 Romain Lenzotti
86
+
87
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
88
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
89
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
90
+ persons to whom the Software is furnished to do so, subject to the following conditions:
91
+
92
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
93
+ Software.
94
+
95
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
96
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
97
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
98
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,54 @@
1
+ {
2
+ "extends": "@tsed/typescript/tsconfig.node.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "module": "ES2020",
6
+ "rootDir": "src",
7
+ "outDir": "./lib/esm",
8
+ "declaration": true,
9
+ "declarationDir": "./lib/types",
10
+ "composite": true,
11
+ "noEmit": false
12
+ },
13
+ "include": ["src", "src/**/*.json"],
14
+ "exclude": [
15
+ "node_modules",
16
+ "test",
17
+ "lib",
18
+ "benchmark",
19
+ "coverage",
20
+ "spec",
21
+ "**/*.benchmark.ts",
22
+ "**/*.spec.ts",
23
+ "keys",
24
+ "jest.config.js",
25
+ "**/__mock__/**",
26
+ "webpack.config.js"
27
+ ],
28
+ "references": [
29
+ {
30
+ "path": "../../specs/ajv"
31
+ },
32
+ {
33
+ "path": "../../platform/common"
34
+ },
35
+ {
36
+ "path": "../../core"
37
+ },
38
+ {
39
+ "path": "../../di"
40
+ },
41
+ {
42
+ "path": "../../specs/json-mapper"
43
+ },
44
+ {
45
+ "path": "../../specs/schema"
46
+ },
47
+ {
48
+ "path": "../oidc-provider"
49
+ },
50
+ {
51
+ "path": "../../specs/exceptions"
52
+ }
53
+ ]
54
+ }