@tsed/oidc-provider 7.18.4 → 7.20.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.
@@ -1,4 +1,4 @@
1
- import { Provider } from "oidc-provider";
1
+ import type { default as Provider } from "oidc-provider";
2
2
  /**
3
3
  * @decorator
4
4
  */
@@ -1,3 +1,3 @@
1
- import { PromptDetail as P } from "oidc-provider";
1
+ import type { PromptDetail as P } from "oidc-provider";
2
2
  export declare function Prompt(): ParameterDecorator;
3
3
  export type Prompt = P;
@@ -1,4 +1,4 @@
1
- import { CanBePromise, interactionPolicy, KoaContextWithOIDC, UnknownObject } from "oidc-provider";
1
+ import type { CanBePromise, interactionPolicy, KoaContextWithOIDC, UnknownObject } from "oidc-provider";
2
2
  export interface InteractionMethods {
3
3
  details?: (ctx: KoaContextWithOIDC) => CanBePromise<UnknownObject>;
4
4
  checks?: () => interactionPolicy.Check[];
@@ -1,4 +1,4 @@
1
- import { Provider, Account } from "oidc-provider";
1
+ import type { default as Provider, Account } from "oidc-provider";
2
2
  export type AuthorizationCode = InstanceType<Provider["AuthorizationCode"]>;
3
3
  export type AccessToken = InstanceType<Provider["AccessToken"]>;
4
4
  export type DeviceCode = InstanceType<Provider["DeviceCode"]>;
@@ -1,2 +1,2 @@
1
- import { Provider as OidcProvider } from "oidc-provider";
1
+ import type { default as OidcProvider } from "oidc-provider";
2
2
  export type OidcInteraction = InstanceType<OidcProvider["Interaction"]>;
@@ -1,4 +1,4 @@
1
- import { CanBePromise, interactionPolicy, KoaContextWithOIDC, UnknownObject } from "oidc-provider";
1
+ import type { CanBePromise, interactionPolicy, KoaContextWithOIDC, UnknownObject } from "oidc-provider";
2
2
  export interface OidcInteractionOptions {
3
3
  name: string;
4
4
  requestable?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { UnknownObject } from "oidc-provider";
1
+ import type { UnknownObject } from "oidc-provider";
2
2
  import { OidcClient } from "./interfaces";
3
3
  export type OidcInteractionPromptProps<Props = Record<string, any>> = {
4
4
  client: OidcClient;
@@ -1,3 +1,3 @@
1
- import { interactionPolicy, Provider } from "oidc-provider";
1
+ import type { interactionPolicy, default as Provider } from "oidc-provider";
2
2
  export type OidcClient = InstanceType<Provider["Client"]>;
3
3
  export type DefaultPolicy = interactionPolicy.DefaultPolicy;
@@ -1,6 +1,6 @@
1
1
  import { Adapter, Adapters } from "@tsed/adapters";
2
2
  import { Configuration } from "@tsed/di";
3
- import { Adapter as OidcAdapter, AdapterConstructor } from "oidc-provider";
3
+ import type { Adapter as OidcAdapter, AdapterConstructor } from "oidc-provider";
4
4
  export type OidcAdapterMethods<Model = any> = Adapter<Model> & Partial<Omit<OidcAdapter, "upsert">>;
5
5
  export declare class OidcAdapters {
6
6
  protected adapters: Adapters;
@@ -1,6 +1,6 @@
1
1
  import { PlatformContext } from "@tsed/common";
2
2
  import { Env } from "@tsed/core";
3
- import { Account, InteractionResults, PromptDetail, Provider } from "oidc-provider";
3
+ import type { Account, InteractionResults, PromptDetail, default as Provider } from "oidc-provider";
4
4
  import { OidcSession } from "../decorators/oidcSession";
5
5
  import { OidcClient } from "../domain/interfaces";
6
6
  import { OidcInteraction } from "../domain/OidcInteraction";
@@ -1,7 +1,7 @@
1
1
  import { PlatformApplication, PlatformContext } from "@tsed/common";
2
2
  import { Env } from "@tsed/core";
3
3
  import { InjectorService } from "@tsed/di";
4
- import { Configuration, interactionPolicy, Provider as OIDCProvider } from "oidc-provider";
4
+ import type { Configuration, interactionPolicy, default as OIDCProvider } from "oidc-provider";
5
5
  import { InteractionMethods } from "../domain/InteractionMethods";
6
6
  import { OidcInteractionOptions } from "../domain/OidcInteractionOptions";
7
7
  import { OidcSettings } from "../domain/OidcSettings";
@@ -22,6 +22,7 @@ export declare class OidcProvider {
22
22
  protected injector: InjectorService;
23
23
  protected app: PlatformApplication;
24
24
  protected $ctx?: PlatformContext;
25
+ get logger(): import("@tsed/common").DILogger;
25
26
  hasConfiguration(): boolean;
26
27
  getConfiguration(): Promise<Configuration>;
27
28
  getIssuer(): string;
@@ -30,10 +31,9 @@ export declare class OidcProvider {
30
31
  * Create a new instance of OidcProvider
31
32
  */
32
33
  create(): Promise<void | OIDCProvider>;
34
+ createPrompt(instance: InteractionMethods, options: OidcInteractionOptions): Promise<interactionPolicy.Prompt>;
33
35
  private createErrorHandler;
34
- createPrompt(instance: InteractionMethods, options: OidcInteractionOptions): interactionPolicy.Prompt;
35
36
  private getInteractionsUrl;
36
37
  private allowHttpLocalhost;
37
38
  private getPolicy;
38
- get logger(): import("@tsed/common").DILogger;
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/oidc-provider",
3
- "version": "7.18.4",
3
+ "version": "7.20.0",
4
4
  "description": "OIDC provider package for Ts.ED framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -23,7 +23,7 @@
23
23
  "lint:fix": "eslint '**/*.{ts,js}' --fix"
24
24
  },
25
25
  "dependencies": {
26
- "@tsed/adapters": "7.18.4",
26
+ "@tsed/adapters": "7.20.0",
27
27
  "express-urlrewrite": "^1.4.0",
28
28
  "jose2": "npm:jose@^2.0.4",
29
29
  "koa-mount": "^4.0.0",
@@ -32,27 +32,27 @@
32
32
  "uuid": "8.3.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@tsed/common": "7.18.4",
36
- "@tsed/core": "7.18.4",
37
- "@tsed/di": "7.18.4",
38
- "@tsed/eslint": "7.18.4",
39
- "@tsed/exceptions": "7.18.4",
40
- "@tsed/jwks": "7.18.4",
41
- "@tsed/typescript": "7.18.4",
35
+ "@tsed/common": "7.20.0",
36
+ "@tsed/core": "7.20.0",
37
+ "@tsed/di": "7.20.0",
38
+ "@tsed/eslint": "7.20.0",
39
+ "@tsed/exceptions": "7.20.0",
40
+ "@tsed/jwks": "7.20.0",
41
+ "@tsed/typescript": "7.20.0",
42
42
  "@types/lowdb": "1.0.11",
43
- "@types/oidc-provider": "^7.1.1",
43
+ "@types/oidc-provider": "8.1.1",
44
44
  "@types/uuid": "8.3.4",
45
45
  "eslint": "^8.12.0",
46
46
  "lowdb": "3.0.0",
47
- "oidc-provider": "7.11.1"
47
+ "oidc-provider": "8.1.1"
48
48
  },
49
49
  "peerDependencies": {
50
- "@tsed/ajv": "^7.18.4",
51
- "@tsed/common": "^7.18.4",
52
- "@tsed/core": "^7.18.4",
53
- "@tsed/di": "^7.18.4",
54
- "@tsed/json-mapper": "^7.18.4",
55
- "@tsed/schema": "^7.18.4",
50
+ "@tsed/ajv": "^7.20.0",
51
+ "@tsed/common": "^7.20.0",
52
+ "@tsed/core": "^7.20.0",
53
+ "@tsed/di": "^7.20.0",
54
+ "@tsed/json-mapper": "^7.20.0",
55
+ "@tsed/schema": "^7.20.0",
56
56
  "oidc-provider": ">=7.3.0"
57
57
  },
58
58
  "peerDependenciesMeta": {