@breadstone/archipel-platform-authentication 0.0.8 → 0.0.9
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 +35 -27
- package/src/AuthModule.d.ts +22 -8
- package/src/AuthModule.js +19 -24
- package/src/connectors/AnonymousConnector.d.ts +42 -0
- package/src/connectors/AnonymousConnector.js +54 -0
- package/src/{strategies/AppleStrategy.d.ts → connectors/AppleConnector.d.ts} +16 -5
- package/src/{strategies/AppleStrategy.js → connectors/AppleConnector.js} +16 -15
- package/src/connectors/ConnectorBase.d.ts +39 -0
- package/src/connectors/ConnectorBase.js +33 -0
- package/src/connectors/GithubConnector.d.ts +34 -0
- package/src/{strategies/GithubStrategy.js → connectors/GithubConnector.js} +13 -12
- package/src/{strategies/GoogleStrategy.d.ts → connectors/GoogleConnector.d.ts} +17 -6
- package/src/{strategies/GoogleStrategy.js → connectors/GoogleConnector.js} +14 -13
- package/src/{strategies/JwtStrategy.d.ts → connectors/JwtConnector.d.ts} +16 -6
- package/src/{strategies/JwtStrategy.js → connectors/JwtConnector.js} +11 -10
- package/src/{strategies/LocalStrategy.d.ts → connectors/LocalConnector.d.ts} +16 -6
- package/src/{strategies/LocalStrategy.js → connectors/LocalConnector.js} +9 -9
- package/src/{strategies/MicrosoftStrategy.d.ts → connectors/MicrosoftConnector.d.ts} +16 -6
- package/src/{strategies/MicrosoftStrategy.js → connectors/MicrosoftConnector.js} +15 -14
- package/src/{apple → connectors/apple}/env.js +1 -1
- package/src/connectors/apple/index.d.ts +2 -0
- package/src/connectors/apple/index.js +8 -0
- package/src/{github → connectors/github}/env.js +1 -1
- package/src/connectors/github/index.d.ts +2 -0
- package/src/connectors/github/index.js +8 -0
- package/src/{google → connectors/google}/env.js +1 -1
- package/src/connectors/google/index.d.ts +2 -0
- package/src/connectors/google/index.js +8 -0
- package/src/{microsoft → connectors/microsoft}/env.js +1 -1
- package/src/connectors/microsoft/index.d.ts +2 -0
- package/src/connectors/microsoft/index.js +8 -0
- package/src/env.d.ts +2 -0
- package/src/env.js +9 -3
- package/src/{services/mfa → mfa}/IMfaChannel.d.ts +1 -1
- package/src/{services/mfa → mfa}/MfaEncryptionService.js +4 -4
- package/src/{services → mfa}/MfaService.d.ts +3 -3
- package/src/{services → mfa}/MfaService.js +3 -3
- package/src/{services/mfa → mfa}/MfaState.js +2 -2
- package/src/{services/mfa → mfa}/channels/EmailOtpMfaChannel.d.ts +2 -2
- package/src/{services/mfa → mfa}/channels/EmailOtpMfaChannel.js +4 -3
- package/src/{services/mfa → mfa}/channels/PushMfaChannel.d.ts +2 -2
- package/src/{services/mfa → mfa}/channels/PushMfaChannel.js +4 -3
- package/src/{services/mfa → mfa}/channels/SmsMfaChannel.d.ts +2 -2
- package/src/{services/mfa → mfa}/channels/SmsMfaChannel.js +4 -3
- package/src/{services/mfa → mfa}/channels/TotpMfaChannel.d.ts +3 -3
- package/src/{services/mfa → mfa}/channels/TotpMfaChannel.js +5 -4
- package/src/mfa/totp/index.d.ts +22 -0
- package/src/mfa/totp/index.js +29 -0
- package/src/services/ChallengeService.js +4 -3
- package/src/services/VerificationService.js +2 -1
- package/src/services/index.d.ts +1 -1
- package/src/services/index.js +1 -1
- package/src/strategies/AnonymousStrategy.js +2 -1
- package/src/apple/index.d.ts +0 -2
- package/src/apple/index.js +0 -8
- package/src/github/index.d.ts +0 -2
- package/src/github/index.js +0 -8
- package/src/google/index.d.ts +0 -2
- package/src/google/index.js +0 -8
- package/src/microsoft/index.d.ts +0 -2
- package/src/microsoft/index.js +0 -8
- package/src/strategies/GithubStrategy.d.ts +0 -23
- /package/src/{apple → connectors/apple}/env.d.ts +0 -0
- /package/src/{github → connectors/github}/env.d.ts +0 -0
- /package/src/{google → connectors/google}/env.d.ts +0 -0
- /package/src/{microsoft → connectors/microsoft}/env.d.ts +0 -0
- /package/src/{services/mfa → mfa}/IMfaChannel.js +0 -0
- /package/src/{services/mfa → mfa}/MfaEncryptionService.d.ts +0 -0
- /package/src/{services/mfa → mfa}/MfaState.d.ts +0 -0
- /package/src/{services/mfa → mfa}/MfaTokens.d.ts +0 -0
- /package/src/{services/mfa → mfa}/MfaTokens.js +0 -0
|
@@ -8,7 +8,8 @@ const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
|
8
8
|
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
9
9
|
const common_1 = require("@nestjs/common");
|
|
10
10
|
const node_crypto_1 = require("node:crypto");
|
|
11
|
-
const MfaSubjectPort_1 = require("
|
|
11
|
+
const MfaSubjectPort_1 = require("../../contracts/MfaSubjectPort");
|
|
12
|
+
const env_1 = require("../../env");
|
|
12
13
|
const MfaState_1 = require("../MfaState");
|
|
13
14
|
// #endregion
|
|
14
15
|
/**
|
|
@@ -25,8 +26,8 @@ let PushMfaChannel = PushMfaChannel_1 = class PushMfaChannel {
|
|
|
25
26
|
this._mfaSubject = mfaSubject;
|
|
26
27
|
this._configService = configService;
|
|
27
28
|
this._bcryptService = bcryptService;
|
|
28
|
-
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(
|
|
29
|
-
this._minResendMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(
|
|
29
|
+
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(env_1.AUTH_MFA_PUSH_CODE_TTL.key, '10m'));
|
|
30
|
+
this._minResendMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(env_1.AUTH_MFA_PUSH_MIN_RESEND.key, '30s'));
|
|
30
31
|
}
|
|
31
32
|
// #endregion
|
|
32
33
|
// #region Methods
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
2
|
import { BcryptService } from '@breadstone/archipel-platform-cryptography';
|
|
3
|
-
import { MfaSubjectPort } from '
|
|
4
|
-
import { IMfaSetup } from '
|
|
3
|
+
import { MfaSubjectPort } from '../../contracts/MfaSubjectPort';
|
|
4
|
+
import { IMfaSetup } from '../../models';
|
|
5
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
6
6
|
import { IMfaSetupContext } from '../MfaState';
|
|
7
7
|
export declare class SmsMfaChannel implements IMfaChannel {
|
|
@@ -8,7 +8,8 @@ const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
|
8
8
|
const archipel_platform_cryptography_1 = require("@breadstone/archipel-platform-cryptography");
|
|
9
9
|
const common_1 = require("@nestjs/common");
|
|
10
10
|
const node_crypto_1 = require("node:crypto");
|
|
11
|
-
const MfaSubjectPort_1 = require("
|
|
11
|
+
const MfaSubjectPort_1 = require("../../contracts/MfaSubjectPort");
|
|
12
|
+
const env_1 = require("../../env");
|
|
12
13
|
const MfaState_1 = require("../MfaState");
|
|
13
14
|
// #endregion
|
|
14
15
|
let SmsMfaChannel = SmsMfaChannel_1 = class SmsMfaChannel {
|
|
@@ -21,8 +22,8 @@ let SmsMfaChannel = SmsMfaChannel_1 = class SmsMfaChannel {
|
|
|
21
22
|
this._mfaSubject = mfaSubject;
|
|
22
23
|
this._configService = configService;
|
|
23
24
|
this._bcryptService = bcryptService;
|
|
24
|
-
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(
|
|
25
|
-
this._minResendMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(
|
|
25
|
+
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(env_1.AUTH_MFA_SMS_CODE_TTL.key, '10m'));
|
|
26
|
+
this._minResendMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(this._configService.tryGet(env_1.AUTH_MFA_SMS_MIN_RESEND.key, '30s'));
|
|
26
27
|
}
|
|
27
28
|
// #endregion
|
|
28
29
|
// #region Methods
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
-
import { IOtpService } from '@breadstone/archipel-platform-cryptography';
|
|
3
|
-
import { MfaSubjectPort } from '
|
|
4
|
-
import { IMfaSetup } from '
|
|
2
|
+
import { IOtpService } from '@breadstone/archipel-platform-cryptography/otp';
|
|
3
|
+
import { MfaSubjectPort } from '../../contracts/MfaSubjectPort';
|
|
4
|
+
import { IMfaSetup } from '../../models';
|
|
5
5
|
import { IMfaChannel } from '../IMfaChannel';
|
|
6
6
|
import { MfaEncryptionService } from '../MfaEncryptionService';
|
|
7
7
|
import { IMfaSetupContext } from '../MfaState';
|
|
@@ -4,9 +4,10 @@ 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
|
|
7
|
+
const otp_1 = require("@breadstone/archipel-platform-cryptography/otp");
|
|
8
8
|
const common_1 = require("@nestjs/common");
|
|
9
|
-
const MfaSubjectPort_1 = require("
|
|
9
|
+
const MfaSubjectPort_1 = require("../../contracts/MfaSubjectPort");
|
|
10
|
+
const env_1 = require("../../env");
|
|
10
11
|
const MfaEncryptionService_1 = require("../MfaEncryptionService");
|
|
11
12
|
const MfaState_1 = require("../MfaState");
|
|
12
13
|
// #endregion
|
|
@@ -20,7 +21,7 @@ let TotpMfaChannel = class TotpMfaChannel {
|
|
|
20
21
|
this._configService = configService;
|
|
21
22
|
this._encryptionService = encryptionService;
|
|
22
23
|
this._otpService = otpService;
|
|
23
|
-
this._issuer = this._configService.
|
|
24
|
+
this._issuer = this._configService.get(env_1.AUTH_MFA_ISSUER.key);
|
|
24
25
|
}
|
|
25
26
|
// #endregion
|
|
26
27
|
// #region Methods
|
|
@@ -93,7 +94,7 @@ let TotpMfaChannel = class TotpMfaChannel {
|
|
|
93
94
|
exports.TotpMfaChannel = TotpMfaChannel;
|
|
94
95
|
exports.TotpMfaChannel = TotpMfaChannel = tslib_1.__decorate([
|
|
95
96
|
(0, common_1.Injectable)(),
|
|
96
|
-
tslib_1.__param(3, (0, common_1.Inject)(
|
|
97
|
+
tslib_1.__param(3, (0, common_1.Inject)(otp_1.OTP_SERVICE_TOKEN)),
|
|
97
98
|
tslib_1.__metadata("design:paramtypes", [MfaSubjectPort_1.MfaSubjectPort,
|
|
98
99
|
archipel_platform_core_1.ConfigService,
|
|
99
100
|
MfaEncryptionService_1.MfaEncryptionService, Object])
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Provider } from '@nestjs/common';
|
|
2
|
+
/**
|
|
3
|
+
* Providers required by the {@link TotpMfaChannel}.
|
|
4
|
+
*
|
|
5
|
+
* Spread these into the `additionalProviders` option of `AuthModule.register()`
|
|
6
|
+
* when enabling TOTP-based MFA.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { TotpMfaChannel, TOTP_MFA_PROVIDERS } from '@breadstone/archipel-platform-authentication/mfa/totp';
|
|
11
|
+
*
|
|
12
|
+
* AuthModule.register({
|
|
13
|
+
* mfaChannels: [TotpMfaChannel],
|
|
14
|
+
* additionalProviders: [...TOTP_MFA_PROVIDERS],
|
|
15
|
+
* // ...
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare const TOTP_MFA_PROVIDERS: ReadonlyArray<Provider>;
|
|
22
|
+
export { TotpMfaChannel } from '../channels/TotpMfaChannel';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//#region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TotpMfaChannel = exports.TOTP_MFA_PROVIDERS = void 0;
|
|
5
|
+
const otp_1 = require("@breadstone/archipel-platform-cryptography/otp");
|
|
6
|
+
//#endregion
|
|
7
|
+
/**
|
|
8
|
+
* Providers required by the {@link TotpMfaChannel}.
|
|
9
|
+
*
|
|
10
|
+
* Spread these into the `additionalProviders` option of `AuthModule.register()`
|
|
11
|
+
* when enabling TOTP-based MFA.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { TotpMfaChannel, TOTP_MFA_PROVIDERS } from '@breadstone/archipel-platform-authentication/mfa/totp';
|
|
16
|
+
*
|
|
17
|
+
* AuthModule.register({
|
|
18
|
+
* mfaChannels: [TotpMfaChannel],
|
|
19
|
+
* additionalProviders: [...TOTP_MFA_PROVIDERS],
|
|
20
|
+
* // ...
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
exports.TOTP_MFA_PROVIDERS = [{ provide: otp_1.OTP_SERVICE_TOKEN, useClass: otp_1.OtpService }];
|
|
27
|
+
var TotpMfaChannel_1 = require("../channels/TotpMfaChannel");
|
|
28
|
+
Object.defineProperty(exports, "TotpMfaChannel", { enumerable: true, get: function () { return TotpMfaChannel_1.TotpMfaChannel; } });
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ChallengeService = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const common_1 = require("@nestjs/common");
|
|
7
6
|
const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
7
|
+
const common_1 = require("@nestjs/common");
|
|
8
8
|
const node_crypto_1 = require("node:crypto");
|
|
9
|
+
const env_1 = require("../env");
|
|
9
10
|
/**
|
|
10
11
|
* Stores and validates MFA login challenges.
|
|
11
12
|
*
|
|
@@ -15,8 +16,8 @@ let ChallengeService = class ChallengeService {
|
|
|
15
16
|
// #endregion
|
|
16
17
|
// #region Ctor
|
|
17
18
|
constructor(configService) {
|
|
18
|
-
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(configService.tryGet(
|
|
19
|
-
this._maxAttempts = Number(configService.tryGet(
|
|
19
|
+
this._ttlMilliseconds = archipel_platform_core_1.DateTimeUtils.parse(configService.tryGet(env_1.AUTH_MFA_CHALLENGE_EXPIRES_IN.key, '5m'));
|
|
20
|
+
this._maxAttempts = Number(configService.tryGet(env_1.AUTH_MFA_MAX_ATTEMPTS.key, '5'));
|
|
20
21
|
this._challenges = new Map();
|
|
21
22
|
}
|
|
22
23
|
// #endregion
|
|
@@ -7,6 +7,7 @@ const archipel_platform_core_1 = require("@breadstone/archipel-platform-core");
|
|
|
7
7
|
const common_1 = require("@nestjs/common");
|
|
8
8
|
const jwt_1 = require("@nestjs/jwt");
|
|
9
9
|
const VerificationSubjectPort_1 = require("../contracts/VerificationSubjectPort");
|
|
10
|
+
const env_1 = require("../env");
|
|
10
11
|
// #endregion
|
|
11
12
|
/**
|
|
12
13
|
* Manages email / PIN verification tokens via the {@link VerificationSubjectPort}.
|
|
@@ -42,7 +43,7 @@ let VerificationService = class VerificationService {
|
|
|
42
43
|
*/
|
|
43
44
|
exhibitToken(data) {
|
|
44
45
|
return this._jwtService.signAsync(data, {
|
|
45
|
-
expiresIn: archipel_platform_core_1.DateTimeUtils.parse(this._configService.get(
|
|
46
|
+
expiresIn: archipel_platform_core_1.DateTimeUtils.parse(this._configService.get(env_1.AUTH_VERIFY_JWT_EXPIRES_IN.key)),
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
/**
|
package/src/services/index.d.ts
CHANGED
package/src/services/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./AuthTokenService"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./ChallengeService"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("
|
|
6
|
+
tslib_1.__exportStar(require("../mfa/MfaService"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./SessionService"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./VerificationService"), exports);
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,6 +8,7 @@ const common_1 = require("@nestjs/common");
|
|
|
8
8
|
const passport_1 = require("@nestjs/passport");
|
|
9
9
|
const passport_custom_1 = require("passport-custom");
|
|
10
10
|
const AuthSubjectPort_1 = require("../contracts/AuthSubjectPort");
|
|
11
|
+
const env_1 = require("../env");
|
|
11
12
|
// #endregion
|
|
12
13
|
/**
|
|
13
14
|
* Anonymous strategy for temporary user login.
|
|
@@ -38,7 +39,7 @@ let AnonymousStrategy = class AnonymousStrategy extends (0, passport_1.PassportS
|
|
|
38
39
|
* @returns The authenticated user and this is also later available in the request.user object
|
|
39
40
|
*/
|
|
40
41
|
async validate() {
|
|
41
|
-
const user = await this._authSubject.findAnonymous(this._configService.get(
|
|
42
|
+
const user = await this._authSubject.findAnonymous(this._configService.get(env_1.SEED_ANONYMOUS_USERNAME.key));
|
|
42
43
|
if (!user) {
|
|
43
44
|
throw new common_1.NotFoundException('User not found');
|
|
44
45
|
}
|
package/src/apple/index.d.ts
DELETED
package/src/apple/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APPLE_AUTH_CONFIG_ENTRIES = exports.AppleStrategy = void 0;
|
|
4
|
-
var AppleStrategy_1 = require("../strategies/AppleStrategy");
|
|
5
|
-
Object.defineProperty(exports, "AppleStrategy", { enumerable: true, get: function () { return AppleStrategy_1.AppleStrategy; } });
|
|
6
|
-
var env_1 = require("./env");
|
|
7
|
-
Object.defineProperty(exports, "APPLE_AUTH_CONFIG_ENTRIES", { enumerable: true, get: function () { return env_1.APPLE_AUTH_CONFIG_ENTRIES; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/src/github/index.d.ts
DELETED
package/src/github/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GITHUB_AUTH_CONFIG_ENTRIES = exports.GithubStrategy = void 0;
|
|
4
|
-
var GithubStrategy_1 = require("../strategies/GithubStrategy");
|
|
5
|
-
Object.defineProperty(exports, "GithubStrategy", { enumerable: true, get: function () { return GithubStrategy_1.GithubStrategy; } });
|
|
6
|
-
var env_1 = require("./env");
|
|
7
|
-
Object.defineProperty(exports, "GITHUB_AUTH_CONFIG_ENTRIES", { enumerable: true, get: function () { return env_1.GITHUB_AUTH_CONFIG_ENTRIES; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/src/google/index.d.ts
DELETED
package/src/google/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GOOGLE_AUTH_CONFIG_ENTRIES = exports.GoogleStrategy = void 0;
|
|
4
|
-
var GoogleStrategy_1 = require("../strategies/GoogleStrategy");
|
|
5
|
-
Object.defineProperty(exports, "GoogleStrategy", { enumerable: true, get: function () { return GoogleStrategy_1.GoogleStrategy; } });
|
|
6
|
-
var env_1 = require("./env");
|
|
7
|
-
Object.defineProperty(exports, "GOOGLE_AUTH_CONFIG_ENTRIES", { enumerable: true, get: function () { return env_1.GOOGLE_AUTH_CONFIG_ENTRIES; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/src/microsoft/index.d.ts
DELETED
package/src/microsoft/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MICROSOFT_AUTH_CONFIG_ENTRIES = exports.MicrosoftStrategy = void 0;
|
|
4
|
-
var MicrosoftStrategy_1 = require("../strategies/MicrosoftStrategy");
|
|
5
|
-
Object.defineProperty(exports, "MicrosoftStrategy", { enumerable: true, get: function () { return MicrosoftStrategy_1.MicrosoftStrategy; } });
|
|
6
|
-
var env_1 = require("./env");
|
|
7
|
-
Object.defineProperty(exports, "MICROSOFT_AUTH_CONFIG_ENTRIES", { enumerable: true, get: function () { return env_1.MICROSOFT_AUTH_CONFIG_ENTRIES; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@breadstone/archipel-platform-core';
|
|
2
|
-
import { type Profile, Strategy } from 'passport-github2';
|
|
3
|
-
import type { IAuthSubject } from '../contracts/IAuthSubject';
|
|
4
|
-
import { SocialAuthPort } from '../contracts/SocialAuthPort';
|
|
5
|
-
declare const GithubStrategy_base: new (...args: [options: import("passport-github2").StrategyOptionsWithRequest] | [options: import("passport-github2").StrategyOptions]) => Strategy & {
|
|
6
|
-
validate(...args: any[]): unknown;
|
|
7
|
-
};
|
|
8
|
-
export declare class GithubStrategy extends GithubStrategy_base {
|
|
9
|
-
private readonly _socialAuth;
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new instance of the `GithubStrategy` class.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
* @param socialAuth Social auth port instance.
|
|
15
|
-
* @param configService Configuration service instance.
|
|
16
|
-
*/
|
|
17
|
-
constructor(socialAuth: SocialAuthPort, configService: ConfigService);
|
|
18
|
-
/**
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
validate(_accessToken: string, _refreshToken: string, profile: Profile): Promise<IAuthSubject>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|