@tsed/oidc-provider 7.18.3-rc.1 → 7.18.3
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/.eslintignore +13 -0
- package/.eslintrc.js +1 -0
- package/jest.config.js +12 -2
- package/lib/cjs/OidcModule.js.map +1 -1
- package/lib/cjs/constants/constants.js.map +1 -1
- package/lib/cjs/decorators/grantId.js.map +1 -1
- package/lib/cjs/decorators/interaction.js.map +1 -1
- package/lib/cjs/decorators/interactions.js.map +1 -1
- package/lib/cjs/decorators/noCache.js.map +1 -1
- package/lib/cjs/decorators/oidcCtx.js.map +1 -1
- package/lib/cjs/decorators/oidcSession.js.map +1 -1
- package/lib/cjs/decorators/params.js.map +1 -1
- package/lib/cjs/decorators/prompt.js.map +1 -1
- package/lib/cjs/decorators/uid.js.map +1 -1
- package/lib/cjs/domain/InteractionMethods.js.map +1 -1
- package/lib/cjs/domain/OidcAccountsMethods.js.map +1 -1
- package/lib/cjs/domain/OidcBadInteractionName.js.map +1 -1
- package/lib/cjs/domain/OidcInteraction.js.map +1 -1
- package/lib/cjs/domain/OidcInteractionMethods.js.map +1 -1
- package/lib/cjs/domain/OidcInteractionOptions.js.map +1 -1
- package/lib/cjs/domain/OidcInteractionPromptProps.js.map +1 -1
- package/lib/cjs/domain/OidcSettings.js.map +1 -1
- package/lib/cjs/domain/interfaces.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/middlewares/OidcInteractionMiddleware.js.map +1 -1
- package/lib/cjs/middlewares/OidcNoCacheMiddleware.js.map +1 -1
- package/lib/cjs/middlewares/OidcSecureMiddleware.js.map +1 -1
- package/lib/cjs/services/OidcAdapters.js.map +1 -1
- package/lib/cjs/services/OidcInteractionContext.js.map +1 -1
- package/lib/cjs/services/OidcInteractions.js.map +1 -1
- package/lib/cjs/services/OidcJwks.js.map +1 -1
- package/lib/cjs/services/OidcProvider.js.map +1 -1
- package/lib/cjs/utils/debug.js.map +1 -1
- package/lib/cjs/utils/events.js +3 -0
- package/lib/cjs/utils/events.js.map +1 -1
- package/lib/esm/OidcModule.js.map +1 -1
- package/lib/esm/constants/constants.js.map +1 -1
- package/lib/esm/decorators/grantId.js.map +1 -1
- package/lib/esm/decorators/interaction.js.map +1 -1
- package/lib/esm/decorators/interactions.js.map +1 -1
- package/lib/esm/decorators/noCache.js.map +1 -1
- package/lib/esm/decorators/oidcCtx.js.map +1 -1
- package/lib/esm/decorators/oidcSession.js.map +1 -1
- package/lib/esm/decorators/params.js.map +1 -1
- package/lib/esm/decorators/prompt.js.map +1 -1
- package/lib/esm/decorators/uid.js.map +1 -1
- package/lib/esm/domain/InteractionMethods.js.map +1 -1
- package/lib/esm/domain/OidcAccountsMethods.js.map +1 -1
- package/lib/esm/domain/OidcBadInteractionName.js.map +1 -1
- package/lib/esm/domain/OidcInteraction.js.map +1 -1
- package/lib/esm/domain/OidcInteractionMethods.js.map +1 -1
- package/lib/esm/domain/OidcInteractionOptions.js.map +1 -1
- package/lib/esm/domain/OidcInteractionPromptProps.js.map +1 -1
- package/lib/esm/domain/OidcSettings.js.map +1 -1
- package/lib/esm/domain/interfaces.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/middlewares/OidcInteractionMiddleware.js.map +1 -1
- package/lib/esm/middlewares/OidcNoCacheMiddleware.js.map +1 -1
- package/lib/esm/middlewares/OidcSecureMiddleware.js.map +1 -1
- package/lib/esm/services/OidcAdapters.js.map +1 -1
- package/lib/esm/services/OidcInteractionContext.js.map +1 -1
- package/lib/esm/services/OidcInteractions.js.map +1 -1
- package/lib/esm/services/OidcJwks.js.map +1 -1
- package/lib/esm/services/OidcProvider.js.map +1 -1
- package/lib/esm/utils/debug.js.map +1 -1
- package/lib/esm/utils/events.js +3 -0
- package/lib/esm/utils/events.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/decorators/grantId.d.ts +1 -1
- package/lib/types/decorators/oidcCtx.d.ts +1 -1
- package/lib/types/decorators/oidcSession.d.ts +1 -1
- package/lib/types/decorators/params.d.ts +1 -1
- package/lib/types/decorators/prompt.d.ts +1 -1
- package/lib/types/decorators/uid.d.ts +1 -1
- package/lib/types/domain/OidcAccountsMethods.d.ts +6 -6
- package/lib/types/domain/OidcInteraction.d.ts +1 -1
- package/lib/types/domain/OidcInteractionPromptProps.d.ts +1 -1
- package/lib/types/domain/interfaces.d.ts +2 -2
- package/lib/types/services/OidcAdapters.d.ts +1 -1
- package/lib/types/utils/events.d.ts +3 -0
- package/package.json +24 -22
- package/tsconfig.esm.json +57 -0
- package/coverage.json +0 -6
- package/tsconfig.compile.esm.json +0 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Provider, Account } from "oidc-provider";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
2
|
+
export type AuthorizationCode = InstanceType<Provider["AuthorizationCode"]>;
|
|
3
|
+
export type AccessToken = InstanceType<Provider["AccessToken"]>;
|
|
4
|
+
export type DeviceCode = InstanceType<Provider["DeviceCode"]>;
|
|
5
|
+
export type RefreshToken = InstanceType<Provider["RefreshToken"]>;
|
|
6
|
+
export type Client = InstanceType<Provider["Client"]>;
|
|
7
|
+
export type BackchannelAuthenticationRequest = InstanceType<Provider["BackchannelAuthenticationRequest"]>;
|
|
8
8
|
export interface OidcAccountsMethods {
|
|
9
9
|
findAccount(id: string, token: AuthorizationCode | AccessToken | DeviceCode | BackchannelAuthenticationRequest | undefined): Promise<Account | undefined>;
|
|
10
10
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Provider as OidcProvider } from "oidc-provider";
|
|
2
|
-
export
|
|
2
|
+
export type OidcInteraction = InstanceType<OidcProvider["Interaction"]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnknownObject } from "oidc-provider";
|
|
2
2
|
import { OidcClient } from "./interfaces";
|
|
3
|
-
export
|
|
3
|
+
export type OidcInteractionPromptProps<Props = Record<string, any>> = {
|
|
4
4
|
client: OidcClient;
|
|
5
5
|
uid: string;
|
|
6
6
|
grantId: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { interactionPolicy, Provider } from "oidc-provider";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type OidcClient = InstanceType<Provider["Client"]>;
|
|
3
|
+
export type DefaultPolicy = interactionPolicy.DefaultPolicy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Adapter, Adapters } from "@tsed/adapters";
|
|
2
2
|
import { Configuration } from "@tsed/di";
|
|
3
3
|
import { Adapter as OidcAdapter, AdapterConstructor } from "oidc-provider";
|
|
4
|
-
export
|
|
4
|
+
export type OidcAdapterMethods<Model = any> = Adapter<Model> & Partial<Omit<OidcAdapter, "upsert">>;
|
|
5
5
|
export declare class OidcAdapters {
|
|
6
6
|
protected adapters: Adapters;
|
|
7
7
|
protected settings: Configuration;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/oidc-provider",
|
|
3
|
-
"version": "7.18.3
|
|
3
|
+
"version": "7.18.3",
|
|
4
4
|
"description": "OIDC provider package for Ts.ED framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -14,40 +14,45 @@
|
|
|
14
14
|
"default": "./lib/esm/index.js"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "yarn barrels && yarn
|
|
18
|
-
"
|
|
19
|
-
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
20
|
-
"start": "ts-node -r tsconfig-paths/register test/app/index.ts",
|
|
17
|
+
"build": "yarn barrels && yarn build:ts",
|
|
18
|
+
"start": "ts-node test/app/index.ts",
|
|
21
19
|
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
|
|
22
|
-
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2"
|
|
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"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@tsed/adapters": "7.18.3
|
|
26
|
+
"@tsed/adapters": "7.18.3",
|
|
26
27
|
"express-urlrewrite": "^1.4.0",
|
|
27
28
|
"jose2": "npm:jose@^2.0.4",
|
|
28
29
|
"koa-mount": "^4.0.0",
|
|
29
30
|
"koa-rewrite": "^3.0.1",
|
|
30
|
-
"tslib": "2.
|
|
31
|
+
"tslib": "2.5.0",
|
|
31
32
|
"uuid": "8.3.2"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@tsed/common": "7.18.3
|
|
35
|
-
"@tsed/core": "7.18.3
|
|
36
|
-
"@tsed/di": "7.18.3
|
|
37
|
-
"@tsed/
|
|
35
|
+
"@tsed/common": "7.18.3",
|
|
36
|
+
"@tsed/core": "7.18.3",
|
|
37
|
+
"@tsed/di": "7.18.3",
|
|
38
|
+
"@tsed/eslint": "7.18.3",
|
|
39
|
+
"@tsed/exceptions": "7.18.3",
|
|
40
|
+
"@tsed/jwks": "7.18.3",
|
|
41
|
+
"@tsed/typescript": "7.18.3",
|
|
38
42
|
"@types/lowdb": "1.0.11",
|
|
39
43
|
"@types/oidc-provider": "^7.1.1",
|
|
40
44
|
"@types/uuid": "8.3.4",
|
|
45
|
+
"eslint": "^8.12.0",
|
|
41
46
|
"lowdb": "3.0.0",
|
|
42
47
|
"oidc-provider": "7.11.1"
|
|
43
48
|
},
|
|
44
49
|
"peerDependencies": {
|
|
45
|
-
"@tsed/ajv": "^7.18.3
|
|
46
|
-
"@tsed/common": "^7.18.3
|
|
47
|
-
"@tsed/core": "^7.18.3
|
|
48
|
-
"@tsed/di": "^7.18.3
|
|
49
|
-
"@tsed/json-mapper": "^7.18.3
|
|
50
|
-
"@tsed/schema": "^7.18.3
|
|
50
|
+
"@tsed/ajv": "^7.18.3",
|
|
51
|
+
"@tsed/common": "^7.18.3",
|
|
52
|
+
"@tsed/core": "^7.18.3",
|
|
53
|
+
"@tsed/di": "^7.18.3",
|
|
54
|
+
"@tsed/json-mapper": "^7.18.3",
|
|
55
|
+
"@tsed/schema": "^7.18.3",
|
|
51
56
|
"oidc-provider": ">=7.3.0"
|
|
52
57
|
},
|
|
53
58
|
"peerDependenciesMeta": {
|
|
@@ -76,8 +81,5 @@
|
|
|
76
81
|
},
|
|
77
82
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/security/oidc-provider",
|
|
78
83
|
"author": "Romain Lenzotti",
|
|
79
|
-
"license": "MIT"
|
|
80
|
-
"publishConfig": {
|
|
81
|
-
"tag": "rc"
|
|
82
|
-
}
|
|
84
|
+
"license": "MIT"
|
|
83
85
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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": "../../specs/exceptions"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../jwks"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../orm/adapters"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
package/coverage.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.compile.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"module": "ES2020",
|
|
6
|
-
"rootDir": "src",
|
|
7
|
-
"outDir": "./lib/esm",
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"declarationDir": "./lib/types"
|
|
10
|
-
},
|
|
11
|
-
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
12
|
-
}
|