@tsed/oidc-provider 8.0.0-alpha.1 → 8.0.0-alpha.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/lib/esm/OidcModule.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/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 +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 +1 -1
- package/lib/esm/services/OidcJwks.js.map +1 -1
- package/lib/esm/services/OidcPolicy.js.map +1 -1
- package/lib/esm/services/OidcProvider.js +0 -1
- package/lib/esm/services/OidcProvider.js.map +1 -1
- package/lib/esm/utils/debug.js.map +1 -1
- package/lib/types/domain/OidcSettings.d.ts +1 -1
- package/lib/types/domain/interfaces.d.ts +1 -1
- package/lib/types/services/OidcInteractionContext.d.ts +1 -1
- package/lib/types/services/OidcProvider.d.ts +1 -1
- package/package.json +28 -29
- package/vitest.config.mts +3 -3
- package/lib/cjs/OidcModule.js +0 -84
- package/lib/cjs/OidcModule.js.map +0 -1
- package/lib/cjs/constants/constants.js +0 -14
- package/lib/cjs/constants/constants.js.map +0 -1
- package/lib/cjs/decorators/grantId.js +0 -11
- package/lib/cjs/decorators/grantId.js.map +0 -1
- package/lib/cjs/decorators/interaction.js +0 -17
- package/lib/cjs/decorators/interaction.js.map +0 -1
- package/lib/cjs/decorators/interactions.js +0 -14
- package/lib/cjs/decorators/interactions.js.map +0 -1
- package/lib/cjs/decorators/noCache.js +0 -10
- package/lib/cjs/decorators/noCache.js.map +0 -1
- package/lib/cjs/decorators/oidcCtx.js +0 -11
- package/lib/cjs/decorators/oidcCtx.js.map +0 -1
- package/lib/cjs/decorators/oidcSession.js +0 -14
- package/lib/cjs/decorators/oidcSession.js.map +0 -1
- package/lib/cjs/decorators/params.js +0 -11
- package/lib/cjs/decorators/params.js.map +0 -1
- package/lib/cjs/decorators/prompt.js +0 -11
- package/lib/cjs/decorators/prompt.js.map +0 -1
- package/lib/cjs/decorators/uid.js +0 -11
- package/lib/cjs/decorators/uid.js.map +0 -1
- package/lib/cjs/domain/InteractionMethods.js +0 -3
- package/lib/cjs/domain/InteractionMethods.js.map +0 -1
- package/lib/cjs/domain/OidcAccountsMethods.js +0 -3
- package/lib/cjs/domain/OidcAccountsMethods.js.map +0 -1
- package/lib/cjs/domain/OidcBadInteractionName.js +0 -8
- package/lib/cjs/domain/OidcBadInteractionName.js.map +0 -1
- package/lib/cjs/domain/OidcInteractionMethods.js +0 -3
- package/lib/cjs/domain/OidcInteractionMethods.js.map +0 -1
- package/lib/cjs/domain/OidcInteractionOptions.js +0 -3
- package/lib/cjs/domain/OidcInteractionOptions.js.map +0 -1
- package/lib/cjs/domain/OidcInteractionPromptProps.js +0 -3
- package/lib/cjs/domain/OidcInteractionPromptProps.js.map +0 -1
- package/lib/cjs/domain/OidcSettings.js +0 -3
- package/lib/cjs/domain/OidcSettings.js.map +0 -1
- package/lib/cjs/domain/interfaces.js +0 -3
- package/lib/cjs/domain/interfaces.js.map +0 -1
- package/lib/cjs/index.js +0 -38
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/middlewares/OidcInteractionMiddleware.js +0 -20
- package/lib/cjs/middlewares/OidcInteractionMiddleware.js.map +0 -1
- package/lib/cjs/middlewares/OidcNoCacheMiddleware.js +0 -22
- package/lib/cjs/middlewares/OidcNoCacheMiddleware.js.map +0 -1
- package/lib/cjs/middlewares/OidcSecureMiddleware.js +0 -38
- package/lib/cjs/middlewares/OidcSecureMiddleware.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/services/OidcAdapters.js +0 -85
- package/lib/cjs/services/OidcAdapters.js.map +0 -1
- package/lib/cjs/services/OidcInteractionContext.js +0 -165
- package/lib/cjs/services/OidcInteractionContext.js.map +0 -1
- package/lib/cjs/services/OidcInteractions.js +0 -64
- package/lib/cjs/services/OidcInteractions.js.map +0 -1
- package/lib/cjs/services/OidcJwks.js +0 -31
- package/lib/cjs/services/OidcJwks.js.map +0 -1
- package/lib/cjs/services/OidcPolicy.js +0 -78
- package/lib/cjs/services/OidcPolicy.js.map +0 -1
- package/lib/cjs/services/OidcProvider.js +0 -201
- package/lib/cjs/services/OidcProvider.js.map +0 -1
- package/lib/cjs/services/OidcProviderNodeModule.js +0 -16
- package/lib/cjs/services/OidcProviderNodeModule.js.map +0 -1
- package/lib/cjs/utils/debug.js +0 -25
- package/lib/cjs/utils/debug.js.map +0 -1
- package/lib/cjs/utils/events.js +0 -64
- package/lib/cjs/utils/events.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/OidcModule.d.ts +0 -14
- package/lib/types-esm/constants/constants.d.ts +0 -10
- package/lib/types-esm/decorators/grantId.d.ts +0 -2
- package/lib/types-esm/decorators/interaction.d.ts +0 -5
- package/lib/types-esm/decorators/interactions.d.ts +0 -6
- package/lib/types-esm/decorators/noCache.d.ts +0 -1
- package/lib/types-esm/decorators/oidcCtx.d.ts +0 -3
- package/lib/types-esm/decorators/oidcSession.d.ts +0 -6
- package/lib/types-esm/decorators/params.d.ts +0 -2
- package/lib/types-esm/decorators/prompt.d.ts +0 -3
- package/lib/types-esm/decorators/uid.d.ts +0 -2
- package/lib/types-esm/domain/InteractionMethods.d.ts +0 -10
- package/lib/types-esm/domain/OidcAccountsMethods.d.ts +0 -5
- package/lib/types-esm/domain/OidcBadInteractionName.d.ts +0 -3
- package/lib/types-esm/domain/OidcInteractionMethods.d.ts +0 -3
- package/lib/types-esm/domain/OidcInteractionOptions.d.ts +0 -8
- package/lib/types-esm/domain/OidcInteractionPromptProps.d.ts +0 -9
- package/lib/types-esm/domain/OidcSettings.d.ts +0 -67
- package/lib/types-esm/domain/interfaces.d.ts +0 -12
- package/lib/types-esm/index.d.ts +0 -34
- package/lib/types-esm/middlewares/OidcInteractionMiddleware.d.ts +0 -5
- package/lib/types-esm/middlewares/OidcNoCacheMiddleware.d.ts +0 -4
- package/lib/types-esm/middlewares/OidcSecureMiddleware.d.ts +0 -4
- package/lib/types-esm/services/OidcAdapters.d.ts +0 -9
- package/lib/types-esm/services/OidcInteractionContext.d.ts +0 -38
- package/lib/types-esm/services/OidcInteractions.d.ts +0 -14
- package/lib/types-esm/services/OidcJwks.d.ts +0 -8
- package/lib/types-esm/services/OidcPolicy.d.ts +0 -16
- package/lib/types-esm/services/OidcProvider.d.ts +0 -40
- package/lib/types-esm/services/OidcProviderNodeModule.d.ts +0 -7
- package/lib/types-esm/utils/debug.d.ts +0 -1
- package/lib/types-esm/utils/events.d.ts +0 -5
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { interactionPolicy, default as Provider } from "oidc-provider";
|
|
2
|
-
export type OIDCContext = InstanceType<Provider["OIDCContext"]>;
|
|
3
|
-
export type OidcClient = InstanceType<Provider["Client"]>;
|
|
4
|
-
export type DefaultPolicy = interactionPolicy.DefaultPolicy;
|
|
5
|
-
export type AuthorizationCode = InstanceType<Provider["AuthorizationCode"]>;
|
|
6
|
-
export type AccessToken = InstanceType<Provider["AccessToken"]>;
|
|
7
|
-
export type ClientCredentials = InstanceType<Provider["ClientCredentials"]>;
|
|
8
|
-
export type DeviceCode = InstanceType<Provider["DeviceCode"]>;
|
|
9
|
-
export type RefreshToken = InstanceType<Provider["RefreshToken"]>;
|
|
10
|
-
export type BackchannelAuthenticationRequest = InstanceType<Provider["BackchannelAuthenticationRequest"]>;
|
|
11
|
-
export type Grant = InstanceType<Provider["Grant"]>;
|
|
12
|
-
export type OidcInteraction = InstanceType<Provider["Interaction"]>;
|
package/lib/types-esm/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Automatically generated by @tsed/barrels.
|
|
3
|
-
*/
|
|
4
|
-
export * from "./constants/constants.js";
|
|
5
|
-
export * from "./decorators/grantId.js";
|
|
6
|
-
export * from "./decorators/interaction.js";
|
|
7
|
-
export * from "./decorators/interactions.js";
|
|
8
|
-
export * from "./decorators/noCache.js";
|
|
9
|
-
export * from "./decorators/oidcCtx.js";
|
|
10
|
-
export * from "./decorators/oidcSession.js";
|
|
11
|
-
export * from "./decorators/params.js";
|
|
12
|
-
export * from "./decorators/prompt.js";
|
|
13
|
-
export * from "./decorators/uid.js";
|
|
14
|
-
export * from "./domain/InteractionMethods.js";
|
|
15
|
-
export * from "./domain/interfaces.js";
|
|
16
|
-
export * from "./domain/OidcAccountsMethods.js";
|
|
17
|
-
export * from "./domain/OidcBadInteractionName.js";
|
|
18
|
-
export * from "./domain/OidcInteractionMethods.js";
|
|
19
|
-
export * from "./domain/OidcInteractionOptions.js";
|
|
20
|
-
export * from "./domain/OidcInteractionPromptProps.js";
|
|
21
|
-
export * from "./domain/OidcSettings.js";
|
|
22
|
-
export * from "./middlewares/OidcInteractionMiddleware.js";
|
|
23
|
-
export * from "./middlewares/OidcNoCacheMiddleware.js";
|
|
24
|
-
export * from "./middlewares/OidcSecureMiddleware.js";
|
|
25
|
-
export * from "./OidcModule.js";
|
|
26
|
-
export * from "./services/OidcAdapters.js";
|
|
27
|
-
export * from "./services/OidcInteractionContext.js";
|
|
28
|
-
export * from "./services/OidcInteractions.js";
|
|
29
|
-
export * from "./services/OidcJwks.js";
|
|
30
|
-
export * from "./services/OidcPolicy.js";
|
|
31
|
-
export * from "./services/OidcProvider.js";
|
|
32
|
-
export * from "./services/OidcProviderNodeModule.js";
|
|
33
|
-
export * from "./utils/debug.js";
|
|
34
|
-
export * from "./utils/events.js";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Adapter, Adapters } from "@tsed/adapters";
|
|
2
|
-
import { Configuration } from "@tsed/di";
|
|
3
|
-
import type { Adapter as OidcAdapter, AdapterConstructor } from "oidc-provider";
|
|
4
|
-
export type OidcAdapterMethods<Model = any> = Adapter<Model> & Partial<Omit<OidcAdapter, "upsert">>;
|
|
5
|
-
export declare class OidcAdapters {
|
|
6
|
-
protected adapters: Adapters;
|
|
7
|
-
protected settings: Configuration;
|
|
8
|
-
createAdapterClass(): AdapterConstructor;
|
|
9
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PlatformContext } from "@tsed/common";
|
|
2
|
-
import { Env } from "@tsed/core";
|
|
3
|
-
import type { Account, InteractionResults, PromptDetail, default as Provider } from "oidc-provider";
|
|
4
|
-
import { OidcSession } from "../decorators/oidcSession.js";
|
|
5
|
-
import { OidcClient, OidcInteraction } from "../domain/interfaces.js";
|
|
6
|
-
import { OidcInteractionPromptProps } from "../domain/OidcInteractionPromptProps.js";
|
|
7
|
-
import { OidcInteractions } from "./OidcInteractions.js";
|
|
8
|
-
import { OidcProvider } from "./OidcProvider.js";
|
|
9
|
-
export declare class OidcInteractionContext {
|
|
10
|
-
protected env: Env;
|
|
11
|
-
protected omitClientProps: string[];
|
|
12
|
-
protected oidcProvider: OidcProvider;
|
|
13
|
-
protected oidcInteractions: OidcInteractions;
|
|
14
|
-
protected $ctx: PlatformContext;
|
|
15
|
-
get raw(): OidcInteraction;
|
|
16
|
-
get session(): OidcSession | undefined;
|
|
17
|
-
get prompt(): PromptDetail;
|
|
18
|
-
get params(): Record<string, any>;
|
|
19
|
-
get uid(): string;
|
|
20
|
-
get grantId(): string;
|
|
21
|
-
runInteraction(name?: string): Promise<void>;
|
|
22
|
-
interactionDetails(): Promise<OidcInteraction>;
|
|
23
|
-
interactionFinished(result: InteractionResults, options?: {
|
|
24
|
-
mergeWithLastSubmission?: boolean;
|
|
25
|
-
}): Promise<void>;
|
|
26
|
-
interactionResult(result: InteractionResults, options?: {
|
|
27
|
-
mergeWithLastSubmission?: boolean;
|
|
28
|
-
}): Promise<string>;
|
|
29
|
-
interactionPrompt({ client, ...options }: Record<string, any>): Promise<OidcInteractionPromptProps>;
|
|
30
|
-
render(view: string, result: any): Promise<string>;
|
|
31
|
-
save(ttl: number): Promise<string>;
|
|
32
|
-
findClient(clientId?: string): Promise<OidcClient | undefined>;
|
|
33
|
-
findAccount(sub?: string, token?: any): Promise<Account | undefined>;
|
|
34
|
-
getGrant(): Promise<InstanceType<Provider["Grant"]>>;
|
|
35
|
-
checkInteractionName(name: string): void;
|
|
36
|
-
checkClientId(clientId?: any): Promise<void>;
|
|
37
|
-
debug(obj?: any): any;
|
|
38
|
-
}
|
|
@@ -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/OidcSettings.js";
|
|
5
|
-
export declare class OidcInteractions {
|
|
6
|
-
protected injector: InjectorService;
|
|
7
|
-
protected env: Env;
|
|
8
|
-
protected 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,16 +0,0 @@
|
|
|
1
|
-
import { InjectorService } from "@tsed/di";
|
|
2
|
-
import { interactionPolicy } from "oidc-provider";
|
|
3
|
-
import { InteractionMethods } from "../domain/InteractionMethods.js";
|
|
4
|
-
import { OidcInteractionOptions } from "../domain/OidcInteractionOptions.js";
|
|
5
|
-
import { OidcInteractions } from "./OidcInteractions.js";
|
|
6
|
-
import { OIDC_PROVIDER_NODE_MODULE } from "./OidcProviderNodeModule.js";
|
|
7
|
-
import Prompt = interactionPolicy.Prompt;
|
|
8
|
-
export declare class OidcPolicy {
|
|
9
|
-
protected module: OIDC_PROVIDER_NODE_MODULE;
|
|
10
|
-
protected injector: InjectorService;
|
|
11
|
-
protected oidcInteractions: OidcInteractions;
|
|
12
|
-
constructor(module: OIDC_PROVIDER_NODE_MODULE);
|
|
13
|
-
getPolicy(): any;
|
|
14
|
-
createPrompt(instance: InteractionMethods, options: OidcInteractionOptions): Prompt;
|
|
15
|
-
private getInteractions;
|
|
16
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { PlatformApplication, PlatformContext } from "@tsed/common";
|
|
2
|
-
import { Env } from "@tsed/core";
|
|
3
|
-
import { InjectorService } from "@tsed/di";
|
|
4
|
-
import type { Configuration } from "oidc-provider";
|
|
5
|
-
import { OidcSettings } from "../domain/OidcSettings.js";
|
|
6
|
-
import { OidcAdapters } from "./OidcAdapters.js";
|
|
7
|
-
import { OidcInteractions } from "./OidcInteractions.js";
|
|
8
|
-
import { OidcJwks } from "./OidcJwks.js";
|
|
9
|
-
import { OidcPolicy } from "./OidcPolicy.js";
|
|
10
|
-
import { OIDC_PROVIDER_NODE_MODULE, Provider } from "./OidcProviderNodeModule.js";
|
|
11
|
-
export declare class OidcProvider {
|
|
12
|
-
protected module: OIDC_PROVIDER_NODE_MODULE;
|
|
13
|
-
raw: Provider;
|
|
14
|
-
protected env: Env;
|
|
15
|
-
protected httpPort: number | string;
|
|
16
|
-
protected httpsPort: number | string;
|
|
17
|
-
protected issuer: string;
|
|
18
|
-
protected oidc: OidcSettings;
|
|
19
|
-
protected platformName: string;
|
|
20
|
-
protected oidcJwks: OidcJwks;
|
|
21
|
-
protected oidcInteractions: OidcInteractions;
|
|
22
|
-
protected oidcPolicy: OidcPolicy;
|
|
23
|
-
protected adapters: OidcAdapters;
|
|
24
|
-
protected injector: InjectorService;
|
|
25
|
-
protected app: PlatformApplication;
|
|
26
|
-
protected $ctx?: PlatformContext;
|
|
27
|
-
constructor(module: OIDC_PROVIDER_NODE_MODULE);
|
|
28
|
-
get logger(): import("@tsed/common").DILogger;
|
|
29
|
-
hasConfiguration(): boolean;
|
|
30
|
-
getConfiguration(): Promise<Configuration>;
|
|
31
|
-
getIssuer(): string;
|
|
32
|
-
get(): Provider;
|
|
33
|
-
/**
|
|
34
|
-
* Create a new instance of OidcProvider
|
|
35
|
-
*/
|
|
36
|
-
create(): Promise<void | Provider>;
|
|
37
|
-
private createErrorHandler;
|
|
38
|
-
private getInteractionsUrl;
|
|
39
|
-
private allowHttpLocalhost;
|
|
40
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import type Provider from "oidc-provider";
|
|
3
|
-
export declare const OIDC_PROVIDER_NODE_MODULE: unique symbol;
|
|
4
|
-
export type OIDC_PROVIDER_NODE_MODULE = {
|
|
5
|
-
Provider: Type<Provider>;
|
|
6
|
-
} & typeof import("oidc-provider");
|
|
7
|
-
export { Provider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const debug: (obj: any) => string;
|