@tsed/oidc-provider 6.95.6 → 6.95.10
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 +13 -13
- package/lib/cjs/OidcModule.d.ts +0 -14
- package/lib/cjs/constants/index.d.ts +0 -10
- package/lib/cjs/decorators/grantId.d.ts +0 -2
- package/lib/cjs/decorators/index.d.ts +0 -9
- package/lib/cjs/decorators/interaction.d.ts +0 -5
- package/lib/cjs/decorators/interactions.d.ts +0 -6
- package/lib/cjs/decorators/noCache.d.ts +0 -1
- package/lib/cjs/decorators/oidcCtx.d.ts +0 -3
- package/lib/cjs/decorators/oidcSession.d.ts +0 -6
- package/lib/cjs/decorators/params.d.ts +0 -2
- package/lib/cjs/decorators/prompt.d.ts +0 -3
- package/lib/cjs/decorators/uid.d.ts +0 -2
- package/lib/cjs/domain/OidcAccountsMethods.d.ts +0 -8
- package/lib/cjs/domain/OidcInteraction.d.ts +0 -2
- package/lib/cjs/domain/OidcInteractionMethods.d.ts +0 -3
- package/lib/cjs/domain/OidcInteractionOptions.d.ts +0 -5
- package/lib/cjs/domain/OidcSettings.d.ts +0 -41
- package/lib/cjs/domain/index.d.ts +0 -8
- package/lib/cjs/index.d.ts +0 -11
- package/lib/cjs/middlewares/OidcInteractionMiddleware.d.ts +0 -7
- package/lib/cjs/middlewares/OidcNoCacheMiddleware.d.ts +0 -4
- package/lib/cjs/middlewares/OidcSecureMiddleware.d.ts +0 -4
- package/lib/cjs/services/OidcAdapters.d.ts +0 -6
- package/lib/cjs/services/OidcInteractionContext.d.ts +0 -33
- package/lib/cjs/services/OidcInteractions.d.ts +0 -14
- package/lib/cjs/services/OidcJwks.d.ts +0 -8
- package/lib/cjs/services/OidcProvider.d.ts +0 -33
- package/lib/cjs/utils/debug.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/oidc-provider",
|
|
3
|
-
"version": "6.95.
|
|
3
|
+
"version": "6.95.10",
|
|
4
4
|
"description": "OIDC provider package for Ts.ED framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "cross-env NODE_ENV=test nyc mocha"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsed/adapters": "6.95.
|
|
23
|
+
"@tsed/adapters": "6.95.10",
|
|
24
24
|
"express-urlrewrite": "^1.4.0",
|
|
25
25
|
"jose2": "npm:jose@^2.0.4",
|
|
26
26
|
"koa-mount": "^4.0.0",
|
|
@@ -30,24 +30,24 @@
|
|
|
30
30
|
"uuid": "8.3.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tsed/common": "6.95.
|
|
34
|
-
"@tsed/core": "6.95.
|
|
35
|
-
"@tsed/di": "6.95.
|
|
36
|
-
"@tsed/exceptions": "6.95.
|
|
33
|
+
"@tsed/common": "6.95.10",
|
|
34
|
+
"@tsed/core": "6.95.10",
|
|
35
|
+
"@tsed/di": "6.95.10",
|
|
36
|
+
"@tsed/exceptions": "6.95.10",
|
|
37
37
|
"@types/lowdb": "1.0.9",
|
|
38
38
|
"@types/oidc-provider": "^7.1.1",
|
|
39
39
|
"@types/uuid": "8.3.0",
|
|
40
40
|
"oidc-provider": "7.10.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@tsed/common": "^6.95.
|
|
44
|
-
"@tsed/core": "^6.95.
|
|
45
|
-
"@tsed/di": "^6.95.
|
|
46
|
-
"@tsed/exceptions": "^6.95.
|
|
47
|
-
"@tsed/json-mapper": "^6.95.
|
|
43
|
+
"@tsed/common": "^6.95.10",
|
|
44
|
+
"@tsed/core": "^6.95.10",
|
|
45
|
+
"@tsed/di": "^6.95.10",
|
|
46
|
+
"@tsed/exceptions": "^6.95.10",
|
|
47
|
+
"@tsed/json-mapper": "^6.95.10",
|
|
48
48
|
"@tsed/logger": ">=6.0.0",
|
|
49
|
-
"@tsed/openspec": "^6.95.
|
|
50
|
-
"@tsed/schema": "^6.95.
|
|
49
|
+
"@tsed/openspec": "^6.95.10",
|
|
50
|
+
"@tsed/schema": "^6.95.10",
|
|
51
51
|
"oidc-provider": ">=7.3.0"
|
|
52
52
|
},
|
|
53
53
|
"repository": "https://github.com/tsedio/tsed",
|
package/lib/cjs/OidcModule.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InjectorService, PlatformApplication } from "@tsed/common";
|
|
2
|
-
import { OidcProvider } from "./services/OidcProvider";
|
|
3
|
-
export declare class OidcModule {
|
|
4
|
-
app: PlatformApplication;
|
|
5
|
-
platformName: string;
|
|
6
|
-
basePath: string;
|
|
7
|
-
oidcProvider: OidcProvider;
|
|
8
|
-
injector: InjectorService;
|
|
9
|
-
$onInit(): Promise<void>;
|
|
10
|
-
$onRoutesInit(): Promise<void>;
|
|
11
|
-
$afterRoutesInit(): Promise<void>;
|
|
12
|
-
$onReady(): void;
|
|
13
|
-
private getRewriteMiddleware;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const INTERACTION_CONTEXT = "interactionContext";
|
|
2
|
-
export declare const INTERACTION_PARAMS = "interactionParams";
|
|
3
|
-
export declare const INTERACTION_GRANT_ID = "interactionGrantId";
|
|
4
|
-
export declare const INTERACTION_PROMPT = "interactionPrompt";
|
|
5
|
-
export declare const INTERACTION_UID = "interactionUid";
|
|
6
|
-
export declare const INTERACTION_SESSION = "interactionSession";
|
|
7
|
-
export declare const INTERACTION_DETAILS = "interactionDetails";
|
|
8
|
-
export declare const INTERACTION_OPTIONS = "interactionOptions";
|
|
9
|
-
export declare const INTERACTION = "interaction";
|
|
10
|
-
export declare const INTERACTIONS = "interactions";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./interactions";
|
|
2
|
-
export * from "./interaction";
|
|
3
|
-
export * from "./noCache";
|
|
4
|
-
export * from "./oidcCtx";
|
|
5
|
-
export * from "./oidcSession";
|
|
6
|
-
export * from "./params";
|
|
7
|
-
export * from "./prompt";
|
|
8
|
-
export * from "./uid";
|
|
9
|
-
export * from "./grantId";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function NoCache(): ClassDecorator;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PlatformContext } from "@tsed/common";
|
|
2
|
-
import { Provider, Account } from "oidc-provider";
|
|
3
|
-
export declare type AuthorizationCode = InstanceType<Provider["AuthorizationCode"]>;
|
|
4
|
-
export declare type AccessToken = InstanceType<Provider["AccessToken"]>;
|
|
5
|
-
export declare type DeviceCode = InstanceType<Provider["DeviceCode"]>;
|
|
6
|
-
export interface OidcAccountsMethods {
|
|
7
|
-
findAccount(id: string, token: AuthorizationCode | AccessToken | DeviceCode | undefined, ctx: PlatformContext): Promise<Account | undefined>;
|
|
8
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import { JwksKeyParameters } from "@tsed/jwks";
|
|
3
|
-
import { Configuration } from "oidc-provider";
|
|
4
|
-
import { OidcAccountsMethods } from "./OidcAccountsMethods";
|
|
5
|
-
export interface OidcSettings extends Configuration {
|
|
6
|
-
/**
|
|
7
|
-
* Path on which the oidc-provider instance is mounted.
|
|
8
|
-
*/
|
|
9
|
-
path?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Issuer URI. By default Ts.ED create issuer with http://localhost:${httpPort}
|
|
12
|
-
*/
|
|
13
|
-
issuer?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Path to store jwks keys.
|
|
16
|
-
*/
|
|
17
|
-
jwksPath?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Generate jwks from given certificates
|
|
20
|
-
*/
|
|
21
|
-
certificates?: JwksKeyParameters[];
|
|
22
|
-
/**
|
|
23
|
-
* Secure keys.
|
|
24
|
-
*/
|
|
25
|
-
secureKey?: string[];
|
|
26
|
-
/**
|
|
27
|
-
* Enable proxy.
|
|
28
|
-
*/
|
|
29
|
-
proxy?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Injectable service to manage accounts.
|
|
32
|
-
*/
|
|
33
|
-
Accounts?: Type<OidcAccountsMethods>;
|
|
34
|
-
}
|
|
35
|
-
declare global {
|
|
36
|
-
namespace TsED {
|
|
37
|
-
interface Configuration {
|
|
38
|
-
oidc: OidcSettings;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Provider, interactionPolicy } from "oidc-provider";
|
|
2
|
-
export * from "./OidcAccountsMethods";
|
|
3
|
-
export * from "./OidcInteraction";
|
|
4
|
-
export * from "./OidcInteractionMethods";
|
|
5
|
-
export * from "./OidcInteractionOptions";
|
|
6
|
-
export * from "./OidcSettings";
|
|
7
|
-
export declare type OidcClient = InstanceType<Provider["Client"]>;
|
|
8
|
-
export declare type DefaultPolicy = interactionPolicy.DefaultPolicy;
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "./decorators";
|
|
2
|
-
export * from "./domain";
|
|
3
|
-
export * from "./middlewares/OidcInteractionMiddleware";
|
|
4
|
-
export * from "./middlewares/OidcNoCacheMiddleware";
|
|
5
|
-
export * from "./middlewares/OidcSecureMiddleware";
|
|
6
|
-
export * from "./services/OidcAdapters";
|
|
7
|
-
export * from "./services/OidcInteractions";
|
|
8
|
-
export * from "./services/OidcInteractionContext";
|
|
9
|
-
export * from "./services/OidcJwks";
|
|
10
|
-
export * from "./services/OidcProvider";
|
|
11
|
-
export * from "./OidcModule";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Context, InjectorService } from "@tsed/common";
|
|
2
|
-
import { OidcInteractions } from "../services/OidcInteractions";
|
|
3
|
-
export declare class OidcInteractionMiddleware {
|
|
4
|
-
protected oidcInteractions: OidcInteractions;
|
|
5
|
-
protected injector: InjectorService;
|
|
6
|
-
use(context: Context): Promise<void>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { PlatformContext } from "@tsed/common";
|
|
2
|
-
import { Env } from "@tsed/core";
|
|
3
|
-
import { Account, InteractionResults, PromptDetail, Provider } from "oidc-provider";
|
|
4
|
-
import { OidcSession } from "../decorators";
|
|
5
|
-
import { OidcClient, OidcInteraction } from "../domain";
|
|
6
|
-
import { OidcInteractions } from "./OidcInteractions";
|
|
7
|
-
import { OidcProvider } from "./OidcProvider";
|
|
8
|
-
export declare class OidcInteractionContext {
|
|
9
|
-
env: Env;
|
|
10
|
-
protected oidcProvider: OidcProvider;
|
|
11
|
-
protected oidcInteractions: OidcInteractions;
|
|
12
|
-
protected context: PlatformContext;
|
|
13
|
-
protected raw: OidcInteraction;
|
|
14
|
-
get session(): OidcSession | undefined;
|
|
15
|
-
get prompt(): PromptDetail;
|
|
16
|
-
get params(): Record<string, any>;
|
|
17
|
-
get uid(): string;
|
|
18
|
-
get grantId(): string;
|
|
19
|
-
runInteraction(name?: string): Promise<void>;
|
|
20
|
-
interactionDetails(): Promise<OidcInteraction>;
|
|
21
|
-
interactionFinished(result: InteractionResults, options?: {
|
|
22
|
-
mergeWithLastSubmission?: boolean;
|
|
23
|
-
}): Promise<void>;
|
|
24
|
-
interactionResult(result: InteractionResults, options?: {
|
|
25
|
-
mergeWithLastSubmission?: boolean;
|
|
26
|
-
}): Promise<string>;
|
|
27
|
-
render(view: string, result: any): Promise<string>;
|
|
28
|
-
save(ttl: number): Promise<string>;
|
|
29
|
-
findClient(clientId?: string): Promise<OidcClient | undefined>;
|
|
30
|
-
findAccount(sub?: string, token?: any): Promise<Account | undefined>;
|
|
31
|
-
getGrant(): Promise<InstanceType<Provider["Grant"]>>;
|
|
32
|
-
debug(obj?: any): any;
|
|
33
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PlatformContext, Provider } from "@tsed/common";
|
|
2
|
-
import { Env } from "@tsed/core";
|
|
3
|
-
import { InjectorService } from "@tsed/di";
|
|
4
|
-
import { OidcSettings } from "../domain";
|
|
5
|
-
export declare class OidcInteractions {
|
|
6
|
-
injector: InjectorService;
|
|
7
|
-
env: Env;
|
|
8
|
-
oidcSettings: OidcSettings;
|
|
9
|
-
protected interactions: Map<string, Provider>;
|
|
10
|
-
$onInit(): void;
|
|
11
|
-
getInteractions(): Provider[];
|
|
12
|
-
getInteractionProvider(name: string): Provider | undefined;
|
|
13
|
-
getInteractionHandler(name: string): ((ctx: PlatformContext) => any) | undefined;
|
|
14
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Env } from "@tsed/core";
|
|
2
|
-
import { InjectorService } from "@tsed/di";
|
|
3
|
-
import { Provider as OIDCProvider, Configuration } from "oidc-provider";
|
|
4
|
-
import { OidcSettings } from "../domain";
|
|
5
|
-
import { OidcAdapters } from "./OidcAdapters";
|
|
6
|
-
import { OidcInteractions } from "./OidcInteractions";
|
|
7
|
-
import { OidcJwks } from "./OidcJwks";
|
|
8
|
-
import { PlatformApplication } from "@tsed/common";
|
|
9
|
-
export declare class OidcProvider {
|
|
10
|
-
raw: OIDCProvider;
|
|
11
|
-
protected env: Env;
|
|
12
|
-
protected httpPort: number | string;
|
|
13
|
-
protected httpsPort: number | string;
|
|
14
|
-
protected issuer: string;
|
|
15
|
-
protected oidc: OidcSettings;
|
|
16
|
-
protected platformName: string;
|
|
17
|
-
protected oidcJwks: OidcJwks;
|
|
18
|
-
protected oidcInteractions: OidcInteractions;
|
|
19
|
-
protected adapters: OidcAdapters;
|
|
20
|
-
protected injector: InjectorService;
|
|
21
|
-
protected app: PlatformApplication;
|
|
22
|
-
hasConfiguration(): boolean;
|
|
23
|
-
getConfiguration(): Promise<Configuration>;
|
|
24
|
-
getIssuer(): string;
|
|
25
|
-
get(): OIDCProvider;
|
|
26
|
-
/**
|
|
27
|
-
* Create a new instance of OidcProvider
|
|
28
|
-
*/
|
|
29
|
-
create(): Promise<void | OIDCProvider>;
|
|
30
|
-
private getInteractionsUrl;
|
|
31
|
-
private allowHttpLocalhost;
|
|
32
|
-
private getPolicy;
|
|
33
|
-
}
|
package/lib/cjs/utils/debug.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const debug: (obj: any) => string;
|