@breadstone/archipel-platform-authentication 0.0.7 → 0.0.8
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/package.json +3 -2
- package/src/AuthModule.js +7 -6
- package/src/services/MfaService.d.ts +1 -1
- package/src/services/MfaService.js +2 -2
- package/src/services/mfa/channels/EmailOtpMfaChannel.d.ts +2 -1
- package/src/services/mfa/channels/EmailOtpMfaChannel.js +2 -1
- package/src/services/mfa/channels/PushMfaChannel.d.ts +2 -1
- package/src/services/mfa/channels/PushMfaChannel.js +2 -1
- package/src/services/mfa/channels/SmsMfaChannel.d.ts +2 -1
- package/src/services/mfa/channels/SmsMfaChannel.js +2 -1
- package/src/services/mfa/channels/TotpMfaChannel.d.ts +2 -1
- package/src/services/mfa/channels/TotpMfaChannel.js +2 -1
- package/src/strategies/LocalStrategy.d.ts +1 -1
- package/src/strategies/LocalStrategy.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/archipel-platform-authentication",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
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",
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
"README.md"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@breadstone/archipel-platform-core": "0.0.
|
|
76
|
+
"@breadstone/archipel-platform-core": "0.0.8",
|
|
77
|
+
"@breadstone/archipel-platform-cryptography": "0.0.8",
|
|
77
78
|
"passport": "0.7.0",
|
|
78
79
|
"passport-custom": "1.1.1",
|
|
79
80
|
"passport-jwt": "4.0.1",
|
package/src/AuthModule.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.AuthModule = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
8
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
8
9
|
const common_1 = require("@nestjs/common");
|
|
9
10
|
const jwt_1 = require("@nestjs/jwt");
|
|
10
11
|
const passport_1 = require("@nestjs/passport");
|
|
@@ -112,8 +113,8 @@ let AuthModule = AuthModule_1 = class AuthModule {
|
|
|
112
113
|
PushMfaChannel_1.PushMfaChannel,
|
|
113
114
|
MfaEncryptionService_1.MfaEncryptionService,
|
|
114
115
|
{
|
|
115
|
-
provide:
|
|
116
|
-
useClass:
|
|
116
|
+
provide: archipel_platform_cryptography_1.OTP_SERVICE_TOKEN,
|
|
117
|
+
useClass: archipel_platform_cryptography_1.OtpService,
|
|
117
118
|
},
|
|
118
119
|
{
|
|
119
120
|
provide: MfaTokens_1.MFA_CHANNELS,
|
|
@@ -122,8 +123,8 @@ let AuthModule = AuthModule_1 = class AuthModule {
|
|
|
122
123
|
},
|
|
123
124
|
archipel_platform_core_1.DeviceParserService,
|
|
124
125
|
middlewares_1.LastActiveMiddleware,
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
archipel_platform_cryptography_1.BcryptService,
|
|
127
|
+
archipel_platform_cryptography_1.CryptoService,
|
|
127
128
|
],
|
|
128
129
|
exports: [
|
|
129
130
|
AuthTokenService_1.AuthTokenService,
|
|
@@ -136,8 +137,8 @@ let AuthModule = AuthModule_1 = class AuthModule {
|
|
|
136
137
|
AnonymousAuthGuard_1.AnonymousAuthGuard,
|
|
137
138
|
GithubAuthGuard_1.GithubAuthGuard,
|
|
138
139
|
RolesGuard_1.RolesGuard,
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
archipel_platform_cryptography_1.BcryptService,
|
|
141
|
+
archipel_platform_cryptography_1.CryptoService,
|
|
141
142
|
],
|
|
142
143
|
};
|
|
143
144
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BcryptService } from '@breadstone/archipel-platform-
|
|
1
|
+
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
2
2
|
import { MfaSubjectPort } from '../contracts/MfaSubjectPort';
|
|
3
3
|
import { IMfaConfirmation, IMfaSetup } from '../models';
|
|
4
4
|
import { IMfaChannel } from './mfa/IMfaChannel';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.MfaService = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const
|
|
6
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
7
7
|
const common_1 = require("@nestjs/common");
|
|
8
8
|
const node_crypto_1 = require("node:crypto");
|
|
9
9
|
const MfaSubjectPort_1 = require("../contracts/MfaSubjectPort");
|
|
@@ -244,7 +244,7 @@ exports.MfaService = MfaService;
|
|
|
244
244
|
exports.MfaService = MfaService = tslib_1.__decorate([
|
|
245
245
|
(0, common_1.Injectable)(),
|
|
246
246
|
tslib_1.__param(3, (0, common_1.Inject)(MfaTokens_1.MFA_CHANNELS)),
|
|
247
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
247
|
+
tslib_1.__metadata("design:paramtypes", [archipel_platform_cryptography_1.BcryptService,
|
|
248
248
|
MfaSubjectPort_1.MfaSubjectPort,
|
|
249
249
|
MfaEncryptionService_1.MfaEncryptionService, Array])
|
|
250
250
|
], MfaService);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
+
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
2
3
|
import { MfaSubjectPort } from '../../../contracts/MfaSubjectPort';
|
|
3
4
|
import { IMfaSetup } from '../../../models';
|
|
4
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.EmailOtpMfaChannel = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
8
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
8
9
|
const common_1 = require("@nestjs/common");
|
|
9
10
|
const node_crypto_1 = require("node:crypto");
|
|
10
11
|
const MfaSubjectPort_1 = require("../../../contracts/MfaSubjectPort");
|
|
@@ -147,6 +148,6 @@ let EmailOtpMfaChannel = EmailOtpMfaChannel_1 = class EmailOtpMfaChannel {
|
|
|
147
148
|
exports.EmailOtpMfaChannel = EmailOtpMfaChannel;
|
|
148
149
|
exports.EmailOtpMfaChannel = EmailOtpMfaChannel = EmailOtpMfaChannel_1 = tslib_1.__decorate([
|
|
149
150
|
(0, common_1.Injectable)(),
|
|
150
|
-
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService,
|
|
151
|
+
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService, archipel_platform_cryptography_1.BcryptService])
|
|
151
152
|
], EmailOtpMfaChannel);
|
|
152
153
|
//# sourceMappingURL=EmailOtpMfaChannel.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
+
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
2
3
|
import { MfaSubjectPort } from '../../../contracts/MfaSubjectPort';
|
|
3
4
|
import { IMfaSetup } from '../../../models';
|
|
4
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.PushMfaChannel = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
8
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
8
9
|
const common_1 = require("@nestjs/common");
|
|
9
10
|
const node_crypto_1 = require("node:crypto");
|
|
10
11
|
const MfaSubjectPort_1 = require("../../../contracts/MfaSubjectPort");
|
|
@@ -145,6 +146,6 @@ let PushMfaChannel = PushMfaChannel_1 = class PushMfaChannel {
|
|
|
145
146
|
exports.PushMfaChannel = PushMfaChannel;
|
|
146
147
|
exports.PushMfaChannel = PushMfaChannel = PushMfaChannel_1 = tslib_1.__decorate([
|
|
147
148
|
(0, common_1.Injectable)(),
|
|
148
|
-
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService,
|
|
149
|
+
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService, archipel_platform_cryptography_1.BcryptService])
|
|
149
150
|
], PushMfaChannel);
|
|
150
151
|
//# sourceMappingURL=PushMfaChannel.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
+
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
2
3
|
import { MfaSubjectPort } from '../../../contracts/MfaSubjectPort';
|
|
3
4
|
import { IMfaSetup } from '../../../models';
|
|
4
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.SmsMfaChannel = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
8
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
8
9
|
const common_1 = require("@nestjs/common");
|
|
9
10
|
const node_crypto_1 = require("node:crypto");
|
|
10
11
|
const MfaSubjectPort_1 = require("../../../contracts/MfaSubjectPort");
|
|
@@ -153,6 +154,6 @@ let SmsMfaChannel = SmsMfaChannel_1 = class SmsMfaChannel {
|
|
|
153
154
|
exports.SmsMfaChannel = SmsMfaChannel;
|
|
154
155
|
exports.SmsMfaChannel = SmsMfaChannel = SmsMfaChannel_1 = tslib_1.__decorate([
|
|
155
156
|
(0, common_1.Injectable)(),
|
|
156
|
-
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService,
|
|
157
|
+
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort, archipel_platform_core_1.ConfigService, archipel_platform_cryptography_1.BcryptService])
|
|
157
158
|
], SmsMfaChannel);
|
|
158
159
|
//# sourceMappingURL=SmsMfaChannel.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ConfigService
|
|
1
|
+
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
+
import { IOtpService } from '@breadstone/archipel-platform-cryptography';
|
|
2
3
|
import { MfaSubjectPort } from '../../../contracts/MfaSubjectPort';
|
|
3
4
|
import { IMfaSetup } from '../../../models';
|
|
4
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.TotpMfaChannel = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
7
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
7
8
|
const common_1 = require("@nestjs/common");
|
|
8
9
|
const MfaSubjectPort_1 = require("../../../contracts/MfaSubjectPort");
|
|
9
10
|
const MfaEncryptionService_1 = require("../MfaEncryptionService");
|
|
@@ -92,7 +93,7 @@ let TotpMfaChannel = class TotpMfaChannel {
|
|
|
92
93
|
exports.TotpMfaChannel = TotpMfaChannel;
|
|
93
94
|
exports.TotpMfaChannel = TotpMfaChannel = tslib_1.__decorate([
|
|
94
95
|
(0, common_1.Injectable)(),
|
|
95
|
-
tslib_1.__param(3, (0, common_1.Inject)(
|
|
96
|
+
tslib_1.__param(3, (0, common_1.Inject)(archipel_platform_cryptography_1.OTP_SERVICE_TOKEN)),
|
|
96
97
|
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort,
|
|
97
98
|
archipel_platform_core_1.ConfigService,
|
|
98
99
|
MfaEncryptionService_1.MfaEncryptionService, Object])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BcryptService } from '@breadstone/archipel-platform-
|
|
1
|
+
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
2
2
|
import { Strategy } from 'passport-local';
|
|
3
3
|
import { AuthSubjectPort } from '../contracts/AuthSubjectPort';
|
|
4
4
|
import type { IAuthSubject } from '../contracts/IAuthSubject';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.LocalStrategy = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const
|
|
6
|
+
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
7
7
|
const common_1 = require("@nestjs/common");
|
|
8
8
|
const passport_1 = require("@nestjs/passport");
|
|
9
9
|
const passport_local_1 = require("passport-local");
|
|
@@ -54,6 +54,6 @@ let LocalStrategy = class LocalStrategy extends (0, passport_1.PassportStrategy)
|
|
|
54
54
|
exports.LocalStrategy = LocalStrategy;
|
|
55
55
|
exports.LocalStrategy = LocalStrategy = tslib_1.__decorate([
|
|
56
56
|
(0, common_1.Injectable)(),
|
|
57
|
-
tslib_1.__metadata("design:paramtypes", [AuthSubjectPort_1.AuthSubjectPort,
|
|
57
|
+
tslib_1.__metadata("design:paramtypes", [AuthSubjectPort_1.AuthSubjectPort, archipel_platform_cryptography_1.BcryptService])
|
|
58
58
|
], LocalStrategy);
|
|
59
59
|
//# sourceMappingURL=LocalStrategy.js.map
|