@tsed/oidc-provider-plugin-wildcard-redirect-uri 8.0.0-beta.1 → 8.0.0-beta.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.
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import {
|
|
3
|
-
import { Logger } from "@tsed/logger";
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { constant, logger, Module } from "@tsed/di";
|
|
4
3
|
import { errors } from "oidc-provider";
|
|
5
4
|
// @ts-ignore
|
|
6
5
|
import psl from "psl";
|
|
7
6
|
import { wildcardRedirectUriAllowed } from "./utils/wildcardRedirectUriAllowed.js";
|
|
8
7
|
let OidcWildcardRedirectUriModule = class OidcWildcardRedirectUriModule {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.enabled = constant("oidc.plugins.wildcard.enabled", false);
|
|
10
|
+
}
|
|
9
11
|
$onCreateOIDC(provider) {
|
|
10
12
|
if (this.enabled) {
|
|
11
13
|
const { redirectUriAllowed, postLogoutRedirectUriAllowed } = provider.Client.prototype;
|
|
12
14
|
provider.Client.prototype.redirectUriAllowed = wildcardRedirectUriAllowed(redirectUriAllowed, "redirectUris");
|
|
13
15
|
provider.Client.prototype.postLogoutRedirectUriAllowed = wildcardRedirectUriAllowed(postLogoutRedirectUriAllowed, "postLogoutRedirectUris");
|
|
14
|
-
|
|
16
|
+
logger().warn("⚠️⚠️⚠️ OIDC Wildcard Uris plugin is ENABLED ⚠️⚠️⚠️");
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
$alterOidcConfiguration(config) {
|
|
@@ -59,14 +61,6 @@ let OidcWildcardRedirectUriModule = class OidcWildcardRedirectUriModule {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
};
|
|
62
|
-
__decorate([
|
|
63
|
-
Constant("oidc.plugins.wildcard.enabled", false),
|
|
64
|
-
__metadata("design:type", Boolean)
|
|
65
|
-
], OidcWildcardRedirectUriModule.prototype, "enabled", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
Inject(Logger),
|
|
68
|
-
__metadata("design:type", Logger)
|
|
69
|
-
], OidcWildcardRedirectUriModule.prototype, "logger", void 0);
|
|
70
64
|
OidcWildcardRedirectUriModule = __decorate([
|
|
71
65
|
Module()
|
|
72
66
|
], OidcWildcardRedirectUriModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OidcWildcardRedirectUriModule.js","sourceRoot":"","sources":["../../src/OidcWildcardRedirectUriModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"OidcWildcardRedirectUriModule.js","sourceRoot":"","sources":["../../src/OidcWildcardRedirectUriModule.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AAElD,OAAiB,EAAC,MAAM,EAA0B,MAAM,eAAe,CAAC;AACxE,aAAa;AACb,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,0BAA0B,EAAC,MAAM,uCAAuC,CAAC;AAa1E,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QACI,YAAO,GAAG,QAAQ,CAAU,+BAA+B,EAAE,KAAK,CAAC,CAAC;IAuE/E,CAAC;IArEC,aAAa,CAAC,QAAkB;QAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,EAAC,kBAAkB,EAAE,4BAA4B,EAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC;YACrF,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,GAAG,0BAA0B,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;YAC9G,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,4BAA4B,GAAG,0BAA0B,CACj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CAAC,EAAE,CAAC;wBACtC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CACpC,wFAAwF,CACzF,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;aAAM,IAAI,GAAG,KAAK,2BAA2B,EAAE,CAAC;YAC/C,KAAK,MAAM,qBAAqB,IAAI,KAAK,EAAE,CAAC;gBAC1C,IAAI,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;oBACxC,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAC,GAAG,IAAI,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBAExD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBACjC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC,yEAAyE,CAAC,CAAC;oBACpH,CAAC;oBAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;wBAC5B,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC,oEAAoE,CAAC,CAAC;oBAC/G,CAAC;oBAED,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;wBACtC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CACpC,oGAAoG,CACrG,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAxEY,6BAA6B;IADzC,MAAM,EAAE;GACI,6BAA6B,CAwEzC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Logger } from "@tsed/logger";
|
|
2
1
|
import { OidcSettings } from "@tsed/oidc-provider";
|
|
3
2
|
import Provider, { type KoaContextWithOIDC } from "oidc-provider";
|
|
4
3
|
declare global {
|
|
@@ -12,7 +11,6 @@ declare global {
|
|
|
12
11
|
}
|
|
13
12
|
export declare class OidcWildcardRedirectUriModule {
|
|
14
13
|
readonly enabled: boolean;
|
|
15
|
-
protected logger: Logger;
|
|
16
14
|
$onCreateOIDC(provider: Provider): void;
|
|
17
15
|
$alterOidcConfiguration(config: OidcSettings): Promise<OidcSettings>;
|
|
18
16
|
validator(ctx: KoaContextWithOIDC, key: string, value: any): void;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/oidc-provider-plugin-wildcard-redirect-uri",
|
|
3
3
|
"description": "A plugin to support wildcard in the redirect uri whitelist",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-beta.
|
|
5
|
+
"version": "8.0.0-beta.2",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"wildcard": "2.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@tsed/barrels": "8.0.0-beta.
|
|
31
|
-
"@tsed/core": "8.0.0-beta.
|
|
32
|
-
"@tsed/di": "8.0.0-beta.
|
|
33
|
-
"@tsed/oidc-provider": "8.0.0-beta.
|
|
34
|
-
"@tsed/typescript": "8.0.0-beta.
|
|
30
|
+
"@tsed/barrels": "8.0.0-beta.2",
|
|
31
|
+
"@tsed/core": "8.0.0-beta.2",
|
|
32
|
+
"@tsed/di": "8.0.0-beta.2",
|
|
33
|
+
"@tsed/oidc-provider": "8.0.0-beta.2",
|
|
34
|
+
"@tsed/typescript": "8.0.0-beta.2",
|
|
35
35
|
"@types/psl": "^1.1.3",
|
|
36
36
|
"@types/uuid": "10.0.0",
|
|
37
37
|
"eslint": "9.12.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"vitest": "2.1.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@tsed/core": "8.0.0-beta.
|
|
43
|
-
"@tsed/di": "8.0.0-beta.
|
|
42
|
+
"@tsed/core": "8.0.0-beta.2",
|
|
43
|
+
"@tsed/di": "8.0.0-beta.2",
|
|
44
44
|
"@tsed/logger": ">=6.7.5",
|
|
45
|
-
"@tsed/oidc-provider": "8.0.0-beta.
|
|
45
|
+
"@tsed/oidc-provider": "8.0.0-beta.2",
|
|
46
46
|
"oidc-provider": ">=8.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|