@breadstone/archipel-platform-authentication 0.0.24 → 0.0.26

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 CHANGED
@@ -10,6 +10,7 @@ Authentication and authorization infrastructure for NestJS applications.
10
10
  - **Anonymous sessions** — Seeded anonymous user support
11
11
  - **Pluggable ports** — All persistence and enrichment via injectable adapters
12
12
  - **NestJS guards & decorators** — Ready-made guards for route protection
13
+ - **Health checks** — `AuthenticationHealthIndicator` for readiness probes (separate `/health` subpath)
13
14
 
14
15
  ## ⚠️ Environment Variables
15
16
 
@@ -67,6 +68,9 @@ import { GithubConnector } from '@breadstone/archipel-platform-authentication/co
67
68
 
68
69
  // MFA/TOTP
69
70
  import { TotpService } from '@breadstone/archipel-platform-authentication/mfa/totp';
71
+
72
+ // Health indicator (optional)
73
+ import { AuthenticationHealthIndicator } from '@breadstone/archipel-platform-authentication/health';
70
74
  ```
71
75
 
72
76
  ## Ports
@@ -93,15 +97,17 @@ import { TotpService } from '@breadstone/archipel-platform-authentication/mfa/to
93
97
 
94
98
  ## Peer Dependencies
95
99
 
96
- | Package | Required | Notes |
97
- | --------------------- | -------- | ----------------------------- |
98
- | `@nestjs/common` | Yes | NestJS core |
99
- | `@nestjs/jwt` | Yes | JWT token handling |
100
- | `class-validator` | Yes | DTO validation |
101
- | `class-transformer` | Yes | DTO transformation |
102
- | `passport` | Yes | Authentication middleware |
103
- | `passport-jwt` | Yes | JWT passport strategy |
104
- | `google-auth-library` | No | Required for Google connector |
100
+ | Package | Required | Notes |
101
+ | -------------------------------------- | -------- | ----------------------------- |
102
+ | `@nestjs/common` | Yes | NestJS core |
103
+ | `@nestjs/jwt` | Yes | JWT token handling |
104
+ | `class-validator` | Yes | DTO validation |
105
+ | `class-transformer` | Yes | DTO transformation |
106
+ | `passport` | Yes | Authentication middleware |
107
+ | `passport-jwt` | Yes | JWT passport strategy |
108
+ | `google-auth-library` | No | Required for Google connector |
109
+ | `@breadstone/archipel-platform-health` | No | Required for health indicator |
110
+ | `@nestjs/terminus` | No | Required for health indicator |
105
111
 
106
112
  ## Documentation
107
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadstone/archipel-platform-authentication",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "JWT and OAuth authentication, MFA, session management, and email verification for NestJS applications.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -21,6 +21,9 @@
21
21
  ],
22
22
  "mfa/totp": [
23
23
  "./src/mfa/totp/index.d.ts"
24
+ ],
25
+ "health": [
26
+ "./src/health/index.d.ts"
24
27
  ]
25
28
  }
26
29
  },
@@ -49,12 +52,17 @@
49
52
  "types": "./src/mfa/totp/index.d.ts",
50
53
  "default": "./src/mfa/totp/index.js"
51
54
  },
55
+ "./health": {
56
+ "types": "./src/health/index.d.ts",
57
+ "default": "./src/health/index.js"
58
+ },
52
59
  "./package.json": "./package.json",
53
60
  "./connectors/apple/index": "./src/connectors/apple/index.js",
54
61
  "./connectors/github/index": "./src/connectors/github/index.js",
55
62
  "./connectors/google/index": "./src/connectors/google/index.js",
56
63
  "./connectors/microsoft/index": "./src/connectors/microsoft/index.js",
57
- "./mfa/totp/index": "./src/mfa/totp/index.js"
64
+ "./mfa/totp/index": "./src/mfa/totp/index.js",
65
+ "./health/index": "./src/health/index.js"
58
66
  },
59
67
  "license": "MIT",
60
68
  "repository": {
@@ -81,18 +89,20 @@
81
89
  "README.md"
82
90
  ],
83
91
  "dependencies": {
84
- "@breadstone/archipel-platform-configuration": "0.0.24",
85
- "@breadstone/archipel-platform-core": "0.0.24",
86
- "@breadstone/archipel-platform-cryptography": "0.0.24",
87
- "@breadstone/archipel-platform-mapping": "0.0.24",
92
+ "@breadstone/archipel-platform-configuration": "0.0.26",
93
+ "@breadstone/archipel-platform-core": "0.0.26",
94
+ "@breadstone/archipel-platform-cryptography": "0.0.26",
95
+ "@breadstone/archipel-platform-mapping": "0.0.26",
88
96
  "tslib": "2.8.1"
89
97
  },
90
98
  "peerDependencies": {
99
+ "@breadstone/archipel-platform-health": ">=0.0.1",
91
100
  "@nestjs/common": ">=11.0.0",
92
101
  "@nestjs/core": ">=11.0.0",
93
102
  "@nestjs/jwt": ">=11.0.0",
94
103
  "@nestjs/passport": ">=11.0.0",
95
104
  "@nestjs/swagger": ">=11.0.0",
105
+ "@nestjs/terminus": ">=11.0.0",
96
106
  "class-transformer": ">=0.5.0",
97
107
  "class-validator": ">=0.14.0",
98
108
  "express": ">=5.0.0",
@@ -107,6 +117,12 @@
107
117
  "rxjs": ">=7.0.0"
108
118
  },
109
119
  "peerDependenciesMeta": {
120
+ "@breadstone/archipel-platform-health": {
121
+ "optional": true
122
+ },
123
+ "@nestjs/terminus": {
124
+ "optional": true
125
+ },
110
126
  "passport-apple": {
111
127
  "optional": true
112
128
  },
@@ -0,0 +1,17 @@
1
+ import { IHealthIndicator } from '@breadstone/archipel-platform-health';
2
+ import { HealthIndicatorResult } from '@nestjs/terminus';
3
+ /**
4
+ * Health indicator for the authentication infrastructure.
5
+ *
6
+ * @public
7
+ */
8
+ export declare class AuthenticationHealthIndicator implements IHealthIndicator {
9
+ readonly key: string;
10
+ /**
11
+ * Returns the health status of the authentication infrastructure.
12
+ *
13
+ * @public
14
+ * @returns The health indicator result.
15
+ */
16
+ check(): HealthIndicatorResult<string>;
17
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AuthenticationHealthIndicator = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const common_1 = require("@nestjs/common");
7
+ // #endregion
8
+ /**
9
+ * Health indicator for the authentication infrastructure.
10
+ *
11
+ * @public
12
+ */
13
+ let AuthenticationHealthIndicator = class AuthenticationHealthIndicator {
14
+ constructor() {
15
+ // #region Properties
16
+ this.key = 'authentication';
17
+ // #endregion
18
+ }
19
+ // #endregion
20
+ // #region Methods
21
+ /**
22
+ * Returns the health status of the authentication infrastructure.
23
+ *
24
+ * @public
25
+ * @returns The health indicator result.
26
+ */
27
+ check() {
28
+ return {
29
+ [this.key]: {
30
+ status: 'up',
31
+ },
32
+ };
33
+ }
34
+ };
35
+ exports.AuthenticationHealthIndicator = AuthenticationHealthIndicator;
36
+ exports.AuthenticationHealthIndicator = AuthenticationHealthIndicator = tslib_1.__decorate([
37
+ (0, common_1.Injectable)()
38
+ ], AuthenticationHealthIndicator);
39
+ //# sourceMappingURL=AuthenticationHealthIndicator.js.map
@@ -0,0 +1 @@
1
+ export { AuthenticationHealthIndicator } from './AuthenticationHealthIndicator';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthenticationHealthIndicator = void 0;
4
+ var AuthenticationHealthIndicator_1 = require("./AuthenticationHealthIndicator");
5
+ Object.defineProperty(exports, "AuthenticationHealthIndicator", { enumerable: true, get: function () { return AuthenticationHealthIndicator_1.AuthenticationHealthIndicator; } });
6
+ //# sourceMappingURL=index.js.map