@open-kingdom/shared-backend-feature-authentication 0.0.2-2 → 0.0.2-4
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/README.md +2 -6
- package/dist/lib/auth.controller.d.ts +3 -3
- package/dist/lib/auth.dto.d.ts.map +1 -1
- package/dist/lib/auth.dto.js +4 -0
- package/dist/lib/feature-backend-auth.module.d.ts +1 -1
- package/dist/lib/feature-backend-auth.module.d.ts.map +1 -1
- package/dist/lib/feature-backend-auth.module.js +1 -1
- package/dist/lib/passport-local-strategy.d.ts +1 -1
- package/package.json +12 -18
package/README.md
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
# feature-
|
|
1
|
+
# feature-authentication
|
|
2
2
|
|
|
3
3
|
This library was generated with [Nx](https://nx.dev).
|
|
4
4
|
|
|
5
5
|
## Building
|
|
6
6
|
|
|
7
|
-
Run `nx build feature-
|
|
8
|
-
|
|
9
|
-
## Running unit tests
|
|
10
|
-
|
|
11
|
-
Run `nx test feature-backend-auth` to execute the unit tests via [Jest](https://jestjs.io).
|
|
7
|
+
Run `nx build feature-authentication` to build the library.
|
|
@@ -7,13 +7,13 @@ export declare class AuthController {
|
|
|
7
7
|
access_token: string;
|
|
8
8
|
}>;
|
|
9
9
|
getProfile(req: RequestWithUser): Omit<{
|
|
10
|
+
email: string;
|
|
11
|
+
password: string;
|
|
10
12
|
id: number;
|
|
11
13
|
firstName: string | null;
|
|
12
14
|
lastName: string | null;
|
|
13
|
-
email: string;
|
|
14
15
|
invitee: number | null;
|
|
15
|
-
role: "
|
|
16
|
-
password: string;
|
|
16
|
+
role: "admin" | "user" | "guest" | null;
|
|
17
17
|
}, "password">;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=auth.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.dto.d.ts","sourceRoot":"","sources":["../../src/lib/auth.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IAOnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.dto.d.ts","sourceRoot":"","sources":["../../src/lib/auth.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IAOnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAQ1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,qBAAa,gBAAgB;IAK3B,YAAY,EAAG,MAAM,CAAC;CACvB;AAED,qBAAa,kBAAkB;IAK7B,EAAE,EAAG,MAAM,CAAC;IAQZ,SAAS,EAAG,MAAM,GAAG,IAAI,CAAC;IAQ1B,QAAQ,EAAG,MAAM,GAAG,IAAI,CAAC;IAMzB,KAAK,EAAG,MAAM,CAAC;IAQf,OAAO,EAAG,MAAM,GAAG,IAAI,CAAC;IAOxB,IAAI,EAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CACnC"}
|
package/dist/lib/auth.dto.js
CHANGED
|
@@ -19,6 +19,7 @@ tslib_1.__decorate([
|
|
|
19
19
|
(0, swagger_1.ApiProperty)({
|
|
20
20
|
description: 'User password',
|
|
21
21
|
example: 'admin',
|
|
22
|
+
type: 'string',
|
|
22
23
|
minLength: 1,
|
|
23
24
|
}),
|
|
24
25
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -47,6 +48,7 @@ tslib_1.__decorate([
|
|
|
47
48
|
(0, swagger_1.ApiProperty)({
|
|
48
49
|
description: 'User first name',
|
|
49
50
|
example: 'John',
|
|
51
|
+
type: 'string',
|
|
50
52
|
nullable: true,
|
|
51
53
|
}),
|
|
52
54
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -55,6 +57,7 @@ tslib_1.__decorate([
|
|
|
55
57
|
(0, swagger_1.ApiProperty)({
|
|
56
58
|
description: 'User last name',
|
|
57
59
|
example: 'Doe',
|
|
60
|
+
type: 'string',
|
|
58
61
|
nullable: true,
|
|
59
62
|
}),
|
|
60
63
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -70,6 +73,7 @@ tslib_1.__decorate([
|
|
|
70
73
|
(0, swagger_1.ApiProperty)({
|
|
71
74
|
description: 'ID of user who invited this user',
|
|
72
75
|
example: null,
|
|
76
|
+
type: 'number',
|
|
73
77
|
nullable: true,
|
|
74
78
|
}),
|
|
75
79
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
2
|
export interface AuthModuleOptions {
|
|
3
3
|
jwtSecret: string;
|
|
4
|
-
jwtExpiresIn?: string;
|
|
4
|
+
jwtExpiresIn?: string | number;
|
|
5
5
|
}
|
|
6
6
|
export declare class OpenKingdomFeatureBackendAuthModule {
|
|
7
7
|
static forRoot(options: AuthModuleOptions): DynamicModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-backend-auth.module.d.ts","sourceRoot":"","sources":["../../src/lib/feature-backend-auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAWvD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-backend-auth.module.d.ts","sourceRoot":"","sources":["../../src/lib/feature-backend-auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAWvD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,qBACa,mCAAmC;IAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa;CAwB1D"}
|
|
@@ -20,7 +20,7 @@ let OpenKingdomFeatureBackendAuthModule = OpenKingdomFeatureBackendAuthModule_1
|
|
|
20
20
|
passport_1.PassportModule,
|
|
21
21
|
jwt_1.JwtModule.register({
|
|
22
22
|
secret: options.jwtSecret,
|
|
23
|
-
signOptions: { expiresIn: options.jwtExpiresIn
|
|
23
|
+
signOptions: { expiresIn: (options.jwtExpiresIn ?? 60) },
|
|
24
24
|
}),
|
|
25
25
|
],
|
|
26
26
|
controllers: [auth_controller_1.AuthController],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Strategy } from 'passport-local';
|
|
2
2
|
import { User } from '@open-kingdom/shared-backend-data-access-users';
|
|
3
3
|
import { AuthenticationService } from './authentication.service';
|
|
4
|
-
declare const LocalStrategy_base: new (...args: [options: import("passport-local").IStrategyOptionsWithRequest] | [options: import("passport-local").IStrategyOptions]
|
|
4
|
+
declare const LocalStrategy_base: new (...args: [] | [options: import("passport-local").IStrategyOptionsWithRequest] | [options: import("passport-local").IStrategyOptions]) => Strategy & {
|
|
5
5
|
validate(...args: any[]): unknown;
|
|
6
6
|
};
|
|
7
7
|
export declare class LocalStrategy extends LocalStrategy_base {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-kingdom/shared-backend-feature-authentication",
|
|
3
|
-
"version": "0.0.2-
|
|
3
|
+
"version": "0.0.2-4",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,27 +17,21 @@
|
|
|
17
17
|
"dist",
|
|
18
18
|
"!**/*.tsbuildinfo"
|
|
19
19
|
],
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@nestjs/common": "11.1.6",
|
|
25
|
-
"tslib": "2.8.1",
|
|
26
|
-
"@nestjs/passport": "11.0.5",
|
|
27
|
-
"@nestjs/jwt": "11.0.0",
|
|
28
|
-
"bcrypt": "^5.1.1",
|
|
29
|
-
"passport-jwt": "^4.0.1",
|
|
30
|
-
"passport-local": "^1.0.0",
|
|
31
|
-
"@nestjs/swagger": "^11.0.0",
|
|
32
|
-
"@open-kingdom/shared-backend-data-access-users": "0.0.2-2",
|
|
33
|
-
"express": "5.1.0"
|
|
34
|
-
},
|
|
35
20
|
"nx": {
|
|
36
|
-
"name": "@open-kingdom/shared-backend-feature-authentication",
|
|
37
21
|
"tags": [
|
|
38
|
-
"type:feature",
|
|
39
22
|
"scope:shared",
|
|
23
|
+
"type:feature",
|
|
40
24
|
"environment:backend"
|
|
41
25
|
]
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"tslib": "^2.3.0",
|
|
29
|
+
"@nestjs/common": "^11.0.0",
|
|
30
|
+
"@nestjs/passport": "^11.0.0",
|
|
31
|
+
"@nestjs/jwt": "^11.0.0",
|
|
32
|
+
"@nestjs/swagger": "^11.0.0",
|
|
33
|
+
"bcrypt": "^5.1.1",
|
|
34
|
+
"passport-jwt": "^4.0.1",
|
|
35
|
+
"passport-local": "^1.0.0"
|
|
42
36
|
}
|
|
43
37
|
}
|