@tsed/passport 8.34.0 → 8.35.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,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import { PlatformApplication } from "@tsed/platform-http";
2
3
  import { Constant, Inject, Module } from "@tsed/di";
3
4
  import { Logger } from "@tsed/logger";
4
- import { PlatformApplication } from "@tsed/platform-http";
5
5
  import Passport from "passport";
6
6
  import { PassportSerializerService } from "./services/PassportSerializerService.js";
7
7
  import { ProtocolsService } from "./services/ProtocolsService.js";
@@ -1,5 +1,5 @@
1
- import { useDecorators } from "@tsed/core";
2
1
  import { Context } from "@tsed/platform-params";
2
+ import { useDecorators } from "@tsed/core";
3
3
  /**
4
4
  * Inject args resolve by the passport strategy on verify method.
5
5
  * @decorator
@@ -1,7 +1,7 @@
1
- import { useDecorators } from "@tsed/core";
2
- import { UseAuth } from "@tsed/platform-middlewares";
3
- import { Security } from "@tsed/schema";
4
1
  import { PassportMiddleware } from "../middlewares/PassportMiddleware.js";
2
+ import { Security } from "@tsed/schema";
3
+ import { UseAuth } from "@tsed/platform-middlewares";
4
+ import { useDecorators } from "@tsed/core";
5
5
  export function Authenticate(protocol = "*", options = {}) {
6
6
  return useDecorators(UseAuth(PassportMiddleware, {
7
7
  protocol,
@@ -1,7 +1,7 @@
1
- import { useDecorators } from "@tsed/core";
2
- import { UseAuth } from "@tsed/platform-middlewares";
3
- import { Security } from "@tsed/schema";
4
1
  import { PassportMiddleware } from "../middlewares/PassportMiddleware.js";
2
+ import { Security } from "@tsed/schema";
3
+ import { UseAuth } from "@tsed/platform-middlewares";
4
+ import { useDecorators } from "@tsed/core";
5
5
  export function Authorize(protocol = "*", options = {}) {
6
6
  return useDecorators(UseAuth(PassportMiddleware, {
7
7
  protocol,
@@ -1,5 +1,5 @@
1
- import { StoreSet, useDecorators } from "@tsed/core";
2
1
  import { Configuration, Injectable } from "@tsed/di";
2
+ import { StoreSet, useDecorators } from "@tsed/core";
3
3
  import { PROVIDER_TYPE_PROTOCOL } from "../contants/constants.js";
4
4
  /**
5
5
  * Declare a new Protocol base on a Passport Strategy
@@ -1,8 +1,8 @@
1
1
  var PassportMiddleware_1;
2
2
  import { __decorate, __metadata, __param } from "tslib";
3
+ import { Context } from "@tsed/platform-params";
3
4
  import { Inject } from "@tsed/di";
4
5
  import { Middleware } from "@tsed/platform-middlewares";
5
- import { Context } from "@tsed/platform-params";
6
6
  import { ProtocolsService } from "../services/ProtocolsService.js";
7
7
  import { getProtocolsFromRequest } from "../utils/getProtocolsFromRequest.js";
8
8
  let PassportMiddleware = PassportMiddleware_1 = class PassportMiddleware {
@@ -1,13 +1,13 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { promisify } from "node:util";
3
- import { ancestorsOf } from "@tsed/core";
4
2
  import { Inject, Injectable, InjectorService } from "@tsed/di";
5
- import { Unauthorized } from "@tsed/exceptions";
6
- import { PlatformHandler } from "@tsed/platform-http";
7
3
  import Passport, { Strategy } from "passport";
4
+ import { PlatformHandler } from "@tsed/platform-http";
8
5
  import { PROVIDER_TYPE_PROTOCOL } from "../contants/constants.js";
9
6
  import { PassportException } from "../errors/PassportException.js";
10
7
  import { PassportMessage } from "../errors/PassportMessage.js";
8
+ import { Unauthorized } from "@tsed/exceptions";
9
+ import { ancestorsOf } from "@tsed/core";
10
+ import { promisify } from "node:util";
11
11
  /**
12
12
  * @ignore
13
13
  */
@@ -1,6 +1,6 @@
1
+ import { BeforeRoutesInit, PlatformApplication } from "@tsed/platform-http";
1
2
  import { type OnInit } from "@tsed/di";
2
3
  import { Logger } from "@tsed/logger";
3
- import { BeforeRoutesInit, PlatformApplication } from "@tsed/platform-http";
4
4
  import { PassportSerializerService } from "./services/PassportSerializerService.js";
5
5
  import { ProtocolsService } from "./services/ProtocolsService.js";
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { Type } from "@tsed/core";
2
1
  import { Strategy } from "passport";
2
+ import { Type } from "@tsed/core";
3
3
  export interface ProtocolOptions<Settings = any> {
4
4
  name: string;
5
5
  useStrategy: Type<Strategy>;
@@ -1,6 +1,6 @@
1
- import { Type } from "@tsed/core";
2
1
  import { PassportStatic } from "passport";
3
2
  import { ProtocolOptions } from "./ProtocolOptions.js";
3
+ import { Type } from "@tsed/core";
4
4
  declare global {
5
5
  namespace TsED {
6
6
  interface Configuration {
@@ -1,6 +1,6 @@
1
1
  import { Provider } from "@tsed/di";
2
- import { PlatformContext, PlatformHandler } from "@tsed/platform-http";
3
2
  import { Strategy } from "passport";
3
+ import { PlatformContext, PlatformHandler } from "@tsed/platform-http";
4
4
  import type { ProtocolMethods } from "../interfaces/ProtocolMethods.js";
5
5
  /**
6
6
  * @ignore
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tsed/passport",
3
+ "version": "8.35.0",
3
4
  "description": "Passport package for Ts.ED framework",
4
- "type": "module",
5
- "version": "8.34.0",
6
5
  "source": "./src/index.ts",
6
+ "type": "module",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
9
  "typings": "./lib/types/index.d.ts",
@@ -28,17 +28,16 @@
28
28
  "tslib": ">=2.7.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@tsed/barrels": "8.34.0",
32
- "@tsed/core": "8.34.0",
33
- "@tsed/di": "8.34.0",
34
- "@tsed/platform-http": "8.34.0",
35
- "@tsed/platform-router": "8.34.0",
36
- "@tsed/typescript": "8.34.0",
31
+ "@tsed/barrels": "8.35.0",
32
+ "@tsed/core": "8.35.0",
33
+ "@tsed/di": "8.35.0",
34
+ "@tsed/platform-http": "8.35.0",
35
+ "@tsed/platform-router": "8.35.0",
36
+ "@tsed/typescript": "8.35.0",
37
37
  "@types/passport": "1.0.16",
38
38
  "@types/passport-http": "0.3.11",
39
39
  "@types/passport-local": "1.0.38",
40
40
  "@types/passport-strategy": "0.2.38",
41
- "eslint": "9.12.0",
42
41
  "passport": "0.7.0",
43
42
  "passport-http": "0.3.0",
44
43
  "passport-local": "1.0.0",