@daffodil/auth 0.91.0 → 0.92.3-rc.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.
- package/driver/magento/index.d.ts +2 -2
- package/fesm2022/daffodil-auth-driver-in-memory.mjs +19 -19
- package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-magento.mjs +24 -24
- package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-driver.mjs +3 -3
- package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
- package/fesm2022/daffodil-auth-routing.mjs +38 -35
- package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
- package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth-state.mjs +42 -60
- package/fesm2022/daffodil-auth-state.mjs.map +1 -1
- package/fesm2022/daffodil-auth-testing.mjs +11 -11
- package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
- package/fesm2022/daffodil-auth.mjs +3 -3
- package/fesm2022/daffodil-auth.mjs.map +1 -1
- package/package.json +1 -1
- package/routing/index.d.ts +24 -15
|
@@ -72,7 +72,7 @@ declare class DaffMagentoRegisterService implements DaffRegisterServiceInterface
|
|
|
72
72
|
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoRegisterService>;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
declare function
|
|
75
|
+
declare function withAuth(): MagentoDriverFeature;
|
|
76
76
|
declare function provideMagentoAuthApolloBearerToken(): i0.EnvironmentProviders;
|
|
77
77
|
/**
|
|
78
78
|
* A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
@@ -131,5 +131,5 @@ interface MagentoResetPasswordResponse {
|
|
|
131
131
|
resetPassword: boolean;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation,
|
|
134
|
+
export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation, withAuth };
|
|
135
135
|
export type { MagentoAuth, MagentoCheckTokenResponse, MagentoGenerateTokenResponse, MagentoRegisterResponse, MagentoResetPasswordResponse, MagentoRevokeCustomerTokenResponse, MagentoSendResetEmailResponse };
|
|
@@ -23,10 +23,10 @@ class DaffInMemoryAuthService extends DaffInMemoryDriverBase {
|
|
|
23
23
|
check() {
|
|
24
24
|
return this.http.post(`${this.url}/check`, {}).pipe(map(() => undefined));
|
|
25
25
|
}
|
|
26
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
27
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
26
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryAuthService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryAuthService, providedIn: 'root' }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryAuthService, decorators: [{
|
|
30
30
|
type: Injectable,
|
|
31
31
|
args: [{
|
|
32
32
|
providedIn: 'root',
|
|
@@ -47,10 +47,10 @@ class DaffInMemoryLoginService extends DaffInMemoryDriverBase {
|
|
|
47
47
|
logout() {
|
|
48
48
|
return this.http.post(`${this.url}/logout`, {}).pipe(switchMap(({ success }) => success ? of(undefined) : throwError(() => new Error('Logout failed'))));
|
|
49
49
|
}
|
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryLoginService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryLoginService, providedIn: 'root' }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryLoginService, decorators: [{
|
|
54
54
|
type: Injectable,
|
|
55
55
|
args: [{
|
|
56
56
|
providedIn: 'root',
|
|
@@ -72,10 +72,10 @@ class DaffInMemoryRegisterService extends DaffInMemoryDriverBase {
|
|
|
72
72
|
registerOnly(registration) {
|
|
73
73
|
return this.http.post(`${this.url}/register`, registration);
|
|
74
74
|
}
|
|
75
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
76
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
75
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryRegisterService, deps: [{ token: i1.HttpClient }, { token: DaffInMemoryLoginService }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
76
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryRegisterService, providedIn: 'root' }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryRegisterService, decorators: [{
|
|
79
79
|
type: Injectable,
|
|
80
80
|
args: [{
|
|
81
81
|
providedIn: 'root',
|
|
@@ -100,10 +100,10 @@ class DaffInMemoryResetPasswordService extends DaffInMemoryDriverBase {
|
|
|
100
100
|
sendResetEmail(email) {
|
|
101
101
|
return this.http.post(`${this.url}/sendResetEmail`, { email });
|
|
102
102
|
}
|
|
103
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
104
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryResetPasswordService, deps: [{ token: i1.HttpClient }, { token: DaffInMemoryLoginService }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
104
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryResetPasswordService, providedIn: 'root' }); }
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryResetPasswordService, decorators: [{
|
|
107
107
|
type: Injectable,
|
|
108
108
|
args: [{
|
|
109
109
|
providedIn: 'root',
|
|
@@ -206,10 +206,10 @@ class DaffInMemoryBackendAuthService {
|
|
|
206
206
|
status: STATUS.OK,
|
|
207
207
|
}));
|
|
208
208
|
}
|
|
209
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
210
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
209
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
210
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendAuthService, providedIn: 'root' }); }
|
|
211
211
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffInMemoryBackendAuthService, decorators: [{
|
|
213
213
|
type: Injectable,
|
|
214
214
|
args: [{
|
|
215
215
|
providedIn: 'root',
|
|
@@ -229,11 +229,11 @@ class DaffAuthInMemoryDriverModule {
|
|
|
229
229
|
],
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
233
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
234
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
232
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
233
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthInMemoryDriverModule, imports: [CommonModule] }); }
|
|
234
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthInMemoryDriverModule, imports: [CommonModule] }); }
|
|
235
235
|
}
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthInMemoryDriverModule, decorators: [{
|
|
237
237
|
type: NgModule,
|
|
238
238
|
args: [{
|
|
239
239
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver-in-memory.mjs","sources":["../../../libs/auth/driver/in-memory/src/collection-name.const.ts","../../../libs/auth/driver/in-memory/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/in-memory/src/drivers/login/login.service.ts","../../../libs/auth/driver/in-memory/src/drivers/register/register.service.ts","../../../libs/auth/driver/in-memory/src/drivers/reset-password/service.ts","../../../libs/auth/driver/in-memory/src/backend/auth.service.ts","../../../libs/auth/driver/in-memory/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/in-memory/src/daffodil-auth-driver-in-memory.ts"],"sourcesContent":["export const DAFF_AUTH_IN_MEMORY_COLLECTION_NAME = 'auth';\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\n\n/**\n * @inheritdoc DaffAuthServiceInterface\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryAuthService extends DaffInMemoryDriverBase implements DaffAuthServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n check(): Observable<void> {\n return this.http.post(`${this.url}/check`, {}).pipe(\n map(() => undefined),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport {\n Observable,\n of,\n throwError,\n} from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryLoginService extends DaffInMemoryDriverBase implements DaffLoginServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n login(request: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.http.post<DaffAuthToken>(`${this.url}/login`, request);\n }\n\n logout(): Observable<void> {\n return this.http.post<{success: boolean}>(`${this.url}/logout`, {}).pipe(\n switchMap(({ success }) => success ? of(undefined) : throwError(() => new Error('Logout failed'))),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryRegisterService extends DaffInMemoryDriverBase implements DaffRegisterServiceInterface {\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly(registration: DaffAccountRegistration): Observable<void> {\n return this.http.post<void>(`${this.url}/register`, registration);\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryResetPasswordService extends DaffInMemoryDriverBase implements DaffResetPasswordServiceInterface {\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return this.http.post<void>(`${this.url}/resetPassword`, info);\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.http.post<void>(`${this.url}/sendResetEmail`, { email });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\nimport {\n InMemoryDbService,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\nimport { DaffInMemoryDbCustomer } from '../models/db-customer.type';\n\n/**\n * @inheritdoc DaffInMemorySingleRouteableBackend\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendAuthService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_AUTH_IN_MEMORY_COLLECTION_NAME;\n\n customers: Record<DaffInMemoryDbCustomer['email'], DaffInMemoryDbCustomer> = {};\n\n private generateToken(): string {\n return faker.string.alphanumeric(16);\n }\n\n createDb() {\n return {\n auth: this.customers,\n };\n }\n\n post(reqInfo) {\n if (reqInfo.id === 'login') {\n return this.login(reqInfo);\n } else if (reqInfo.id === 'register') {\n return this.register(reqInfo);\n } else if (reqInfo.id === 'logout') {\n return this.logout(reqInfo);\n } else if (reqInfo.id === 'check') {\n return this.check(reqInfo);\n } else if (reqInfo.id === 'resetPassword') {\n return this.resetPassword(reqInfo);\n } else if (reqInfo.id === 'sendResetEmail') {\n return this.sendResetEmail(reqInfo);\n }\n }\n\n private login(reqInfo: any) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n const customer = this.customers[email];\n\n if (password && customer?.password === password) {\n this.customers[email].token = this.generateToken();\n\n return reqInfo.utils.createResponse$(() => ({\n body: {\n token: customer.token,\n },\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private register(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n this.customers[email] = {\n email,\n password,\n };\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.CREATED,\n }));\n }\n\n private logout(reqInfo) {\n const {\n email,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].token = null;\n }\n\n return reqInfo.utils.createResponse$(() => ({\n body: { success: true },\n status: STATUS.OK,\n }));\n }\n\n private check(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n\n private resetPassword(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].password = password;\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private sendResetEmail(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffLoginDriver,\n provideDaffRegisterDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffInMemoryAuthService } from './auth/auth.service';\nimport { DaffInMemoryLoginService } from './login/login.service';\nimport { DaffInMemoryRegisterService } from './register/register.service';\nimport { DaffInMemoryResetPasswordService } from './reset-password/service';\nimport { DaffInMemoryBackendAuthService } from '../backend/auth.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthInMemoryDriverModule> {\n return {\n ngModule: DaffAuthInMemoryDriverModule,\n providers: [\n provideDaffLoginDriver(DaffInMemoryLoginService),\n provideDaffRegisterDriver(DaffInMemoryRegisterService),\n provideDaffAuthDriver(DaffInMemoryAuthService),\n provideDaffResetPasswordDriver(DaffInMemoryResetPasswordService),\n provideDaffInMemoryBackends(\n DaffInMemoryBackendAuthService,\n ),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.DaffInMemoryLoginService","i3"],"mappings":";;;;;;;;;;;;AAAO,MAAM,mCAAmC,GAAG,MAAM;;ACWzD;;AAEG;AAIG,MAAO,uBAAwB,SAAQ,sBAAsB,CAAA;IACjE,WAAA,CACU,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,mCAAmC,CAAC;QAH1C,IAAA,CAAA,IAAI,GAAJ,IAAI;IAId;IAEA,KAAK,GAAA;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,MAAA,CAAQ,EAAE,EAAE,CAAC,CAAC,IAAI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gBAChD,yBAAyB,CAAC,2BAA2B,CAAC;gBACtD,qBAAqB,CAAC,uBAAuB,CAAC;gBAC9C,8BAA8B,CAAC,gCAAgC,CAAC;gBAChE,2BAA2B,CACzB,8BAA8B,CAC/B;AACF,aAAA;SACF;IACH;iIAdW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA5B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAHrC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAHrC,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBALxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver-in-memory.mjs","sources":["../../../libs/auth/driver/in-memory/src/collection-name.const.ts","../../../libs/auth/driver/in-memory/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/in-memory/src/drivers/login/login.service.ts","../../../libs/auth/driver/in-memory/src/drivers/register/register.service.ts","../../../libs/auth/driver/in-memory/src/drivers/reset-password/service.ts","../../../libs/auth/driver/in-memory/src/backend/auth.service.ts","../../../libs/auth/driver/in-memory/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/in-memory/src/daffodil-auth-driver-in-memory.ts"],"sourcesContent":["export const DAFF_AUTH_IN_MEMORY_COLLECTION_NAME = 'auth';\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\n\n/**\n * @inheritdoc DaffAuthServiceInterface\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryAuthService extends DaffInMemoryDriverBase implements DaffAuthServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n check(): Observable<void> {\n return this.http.post(`${this.url}/check`, {}).pipe(\n map(() => undefined),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport {\n Observable,\n of,\n throwError,\n} from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryLoginService extends DaffInMemoryDriverBase implements DaffLoginServiceInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n login(request: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.http.post<DaffAuthToken>(`${this.url}/login`, request);\n }\n\n logout(): Observable<void> {\n return this.http.post<{success: boolean}>(`${this.url}/logout`, {}).pipe(\n switchMap(({ success }) => success ? of(undefined) : throwError(() => new Error('Logout failed'))),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryRegisterService extends DaffInMemoryDriverBase implements DaffRegisterServiceInterface {\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly(registration: DaffAccountRegistration): Observable<void> {\n return this.http.post<void>(`${this.url}/register`, registration);\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../../collection-name.const';\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryResetPasswordService extends DaffInMemoryDriverBase implements DaffResetPasswordServiceInterface {\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_AUTH_IN_MEMORY_COLLECTION_NAME);\n }\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return this.http.post<void>(`${this.url}/resetPassword`, info);\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.http.post<void>(`${this.url}/sendResetEmail`, { email });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\nimport {\n InMemoryDbService,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\n\nimport { DAFF_AUTH_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\nimport { DaffInMemoryDbCustomer } from '../models/db-customer.type';\n\n/**\n * @inheritdoc DaffInMemorySingleRouteableBackend\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendAuthService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_AUTH_IN_MEMORY_COLLECTION_NAME;\n\n customers: Record<DaffInMemoryDbCustomer['email'], DaffInMemoryDbCustomer> = {};\n\n private generateToken(): string {\n return faker.string.alphanumeric(16);\n }\n\n createDb() {\n return {\n auth: this.customers,\n };\n }\n\n post(reqInfo) {\n if (reqInfo.id === 'login') {\n return this.login(reqInfo);\n } else if (reqInfo.id === 'register') {\n return this.register(reqInfo);\n } else if (reqInfo.id === 'logout') {\n return this.logout(reqInfo);\n } else if (reqInfo.id === 'check') {\n return this.check(reqInfo);\n } else if (reqInfo.id === 'resetPassword') {\n return this.resetPassword(reqInfo);\n } else if (reqInfo.id === 'sendResetEmail') {\n return this.sendResetEmail(reqInfo);\n }\n }\n\n private login(reqInfo: any) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n const customer = this.customers[email];\n\n if (password && customer?.password === password) {\n this.customers[email].token = this.generateToken();\n\n return reqInfo.utils.createResponse$(() => ({\n body: {\n token: customer.token,\n },\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private register(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n this.customers[email] = {\n email,\n password,\n };\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.CREATED,\n }));\n }\n\n private logout(reqInfo) {\n const {\n email,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].token = null;\n }\n\n return reqInfo.utils.createResponse$(() => ({\n body: { success: true },\n status: STATUS.OK,\n }));\n }\n\n private check(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n\n private resetPassword(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].password = password;\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private sendResetEmail(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffLoginDriver,\n provideDaffRegisterDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffInMemoryAuthService } from './auth/auth.service';\nimport { DaffInMemoryLoginService } from './login/login.service';\nimport { DaffInMemoryRegisterService } from './register/register.service';\nimport { DaffInMemoryResetPasswordService } from './reset-password/service';\nimport { DaffInMemoryBackendAuthService } from '../backend/auth.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthInMemoryDriverModule> {\n return {\n ngModule: DaffAuthInMemoryDriverModule,\n providers: [\n provideDaffLoginDriver(DaffInMemoryLoginService),\n provideDaffRegisterDriver(DaffInMemoryRegisterService),\n provideDaffAuthDriver(DaffInMemoryAuthService),\n provideDaffResetPasswordDriver(DaffInMemoryResetPasswordService),\n provideDaffInMemoryBackends(\n DaffInMemoryBackendAuthService,\n ),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.DaffInMemoryLoginService","i3"],"mappings":";;;;;;;;;;;;AAAO,MAAM,mCAAmC,GAAG,MAAM;;ACWzD;;AAEG;AAIG,MAAO,uBAAwB,SAAQ,sBAAsB,CAAA;IACjE,WAAA,CACU,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,mCAAmC,CAAC;QAH1C,IAAA,CAAA,IAAI,GAAJ,IAAI;IAId;IAEA,KAAK,GAAA;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,MAAA,CAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CACjD,GAAG,CAAC,MAAM,SAAS,CAAC,CACrB;IACH;kIAZW,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,qBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAA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MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA5B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAHrC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAHrC,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBALxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -154,10 +154,10 @@ class DaffMagentoAuthService {
|
|
|
154
154
|
fetchPolicy: 'no-cache',
|
|
155
155
|
}).pipe(map(validateCheckTokenResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
|
|
156
156
|
}
|
|
157
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
158
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
157
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
158
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthService, providedIn: 'root' }); }
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthService, decorators: [{
|
|
161
161
|
type: Injectable,
|
|
162
162
|
args: [{
|
|
163
163
|
providedIn: 'root',
|
|
@@ -178,10 +178,10 @@ class DaffMagentoAuthTransformerService {
|
|
|
178
178
|
token: auth.token,
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
182
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
181
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthTransformerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
182
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthTransformerService, providedIn: 'root' }); }
|
|
183
183
|
}
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoAuthTransformerService, decorators: [{
|
|
185
185
|
type: Injectable,
|
|
186
186
|
args: [{
|
|
187
187
|
providedIn: 'root',
|
|
@@ -208,10 +208,10 @@ class DaffMagentoLoginService {
|
|
|
208
208
|
logout() {
|
|
209
209
|
return this.apollo.mutate({ mutation: revokeCustomerTokenMutation }).pipe(map(validateRevokeTokenResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
|
|
210
210
|
}
|
|
211
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
212
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
211
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoLoginService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoAuthTransformerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
212
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoLoginService, providedIn: 'root' }); }
|
|
213
213
|
}
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoLoginService, decorators: [{
|
|
215
215
|
type: Injectable,
|
|
216
216
|
args: [{
|
|
217
217
|
providedIn: 'root',
|
|
@@ -246,10 +246,10 @@ class DaffMagentoRegisterService {
|
|
|
246
246
|
return;
|
|
247
247
|
}), catchError(err => throwError(() => transformMagentoAuthError(err))));
|
|
248
248
|
}
|
|
249
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
250
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
249
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoRegisterService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
250
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoRegisterService, providedIn: 'root' }); }
|
|
251
251
|
}
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoRegisterService, decorators: [{
|
|
253
253
|
type: Injectable,
|
|
254
254
|
args: [{
|
|
255
255
|
providedIn: 'root',
|
|
@@ -285,10 +285,10 @@ class DaffMagentoResetPasswordService {
|
|
|
285
285
|
},
|
|
286
286
|
}).pipe(map(validateSendResetEmailResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
|
|
287
287
|
}
|
|
288
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
289
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
288
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoResetPasswordService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
289
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoResetPasswordService, providedIn: 'root' }); }
|
|
290
290
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffMagentoResetPasswordService, decorators: [{
|
|
292
292
|
type: Injectable,
|
|
293
293
|
args: [{
|
|
294
294
|
providedIn: 'root',
|
|
@@ -307,11 +307,11 @@ class DaffAuthMagentoDriverModule {
|
|
|
307
307
|
],
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
311
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
312
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
310
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
311
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
|
|
312
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
|
|
313
313
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthMagentoDriverModule, decorators: [{
|
|
315
315
|
type: NgModule,
|
|
316
316
|
args: [{
|
|
317
317
|
imports: [
|
|
@@ -320,7 +320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
320
320
|
}]
|
|
321
321
|
}] });
|
|
322
322
|
|
|
323
|
-
function
|
|
323
|
+
function withAuth() {
|
|
324
324
|
return makeMagentoDriverFeature('MagentoAuthApolloBearerToken', [
|
|
325
325
|
provideMagentoAuthApolloBearerToken(),
|
|
326
326
|
]);
|
|
@@ -369,10 +369,10 @@ class MagentoAuthApolloBearerTokenLinkGenerator {
|
|
|
369
369
|
return forward(operation);
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
373
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
372
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, deps: [{ token: i1$2.DaffAuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
373
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, providedIn: 'root' }); }
|
|
374
374
|
}
|
|
375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, decorators: [{
|
|
376
376
|
type: Injectable,
|
|
377
377
|
args: [{
|
|
378
378
|
providedIn: 'root',
|
|
@@ -383,5 +383,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
383
383
|
* Generated bundle index. Do not edit.
|
|
384
384
|
*/
|
|
385
385
|
|
|
386
|
-
export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation,
|
|
386
|
+
export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation, withAuth };
|
|
387
387
|
//# sourceMappingURL=daffodil-auth-driver-magento.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffRegisterDriver,\n provideDaffLoginDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n provideDaffRegisterDriver(DaffMagentoRegisterService),\n provideDaffLoginDriver(DaffMagentoLoginService),\n provideDaffAuthDriver(DaffMagentoAuthService),\n provideDaffResetPasswordDriver(DaffMagentoResetPasswordService),\n ],\n };\n }\n}\n","import {\n inject,\n Injectable,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DaffApolloLinkGenerator,\n provideDaffApolloHeaderProviders,\n} from '@daffodil/core/graphql';\nimport {\n makeMagentoDriverFeature,\n MagentoDriverFeature,\n} from '@daffodil/driver/magento';\n\nexport function withMagentoAuthApolloBearerToken(): MagentoDriverFeature {\n return makeMagentoDriverFeature('MagentoAuthApolloBearerToken', [\n provideMagentoAuthApolloBearerToken(),\n ]);\n}\n\nexport function provideMagentoAuthApolloBearerToken() {\n return makeEnvironmentProviders([\n provideDaffApolloHeaderProviders(() => {\n const storage = inject(DaffAuthStorageService);\n let token = null;\n\n try {\n token = storage.getAuthToken();\n } catch(e){}\n\n return token\n ? {\n authorization: `Bearer ${token}`,\n }\n : {};\n }),\n ]);\n}\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n let token = null;\n\n try {\n token = this.storage.getAuthToken();\n } catch(e){}\n\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAY,2BAIX;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAAA,EAAA,CAAA,CAAA;;ACShC,MAAM,uBAAuB,GAAqB;AACvD,IAAA,CAAC,2BAA2B,CAAC,YAAY,GAAG,qBAAqB;AAC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AC,OAAO,CAAC,YAAY,EAAE;YACrC;AAAE,YAAA,OAAM,CAAC,EAAC,EAAC;YAEX,IAAI,KAAK,EAAE;gBACT,SAAS,CAAC,UAAU,CAAC;AACnB,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC,OAAO;wBACjC,aAAa,EAAE,CAAA,OAAA,EAAU,KAAK,CAAA,CAAE;AACjC,qBAAA;AACF,iBAAA,CAAC;YACJ;AACA,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC;AAC3B,QAAA,CAAC,CAAC;IACJ;iIAvBW,yCAAyC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAF,IAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;;2FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACjDD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffRegisterDriver,\n provideDaffLoginDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n provideDaffRegisterDriver(DaffMagentoRegisterService),\n provideDaffLoginDriver(DaffMagentoLoginService),\n provideDaffAuthDriver(DaffMagentoAuthService),\n provideDaffResetPasswordDriver(DaffMagentoResetPasswordService),\n ],\n };\n }\n}\n","import {\n inject,\n Injectable,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DaffApolloLinkGenerator,\n provideDaffApolloHeaderProviders,\n} from '@daffodil/core/graphql';\nimport {\n makeMagentoDriverFeature,\n MagentoDriverFeature,\n} from '@daffodil/driver/magento';\n\nexport function withAuth(): MagentoDriverFeature {\n return makeMagentoDriverFeature('MagentoAuthApolloBearerToken', [\n provideMagentoAuthApolloBearerToken(),\n ]);\n}\n\nexport function provideMagentoAuthApolloBearerToken() {\n return makeEnvironmentProviders([\n provideDaffApolloHeaderProviders(() => {\n const storage = inject(DaffAuthStorageService);\n let token = null;\n\n try {\n token = storage.getAuthToken();\n } catch(e){}\n\n return token\n ? {\n authorization: `Bearer ${token}`,\n }\n : {};\n }),\n ]);\n}\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n let token = null;\n\n try {\n token = this.storage.getAuthToken();\n } catch(e){}\n\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAY,2BAIX;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAAA,EAAA,CAAA,CAAA;;ACShC,MAAM,uBAAuB,GAAqB;AACvD,IAAA,CAAC,2BAA2B,CAAC,YAAY,GAAG,qBAAqB;AACjE,IAAA,CAAC,2BAA2B,CAAC,qBAAqB,GAAG,6BAA6B;AAClF,IAAA,CAAC,2BAA2B,CAAC,SAAS,GAAG,iBAAiB;CAC3D;;ACRM,MAAM,yBAAyB,GAAG,CAAC,KAAU,KAAY,yBAAyB,CAAC,KAAK,EAAE,uBAAuB,CAAC,IAAI,IAAI,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC;;ACFxK,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;ACA3B,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;ACAlC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;ACAjC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;;ACAvC,MAAM,8BAA8B,GAAG,GAAG,CAAA;;;;;;;;ACA1C,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;ACGjC,MAAM,0BAA0B,GAAG,CAAC,QAAsD,KAAI;IACnG,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;AAChC,QAAA,OAA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AAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;;4FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACjDD;;AAEG;;;;"}
|
|
@@ -12,10 +12,10 @@ class DaffTestingAuthService {
|
|
|
12
12
|
check() {
|
|
13
13
|
return of(undefined);
|
|
14
14
|
}
|
|
15
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
16
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
15
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingAuthService, providedIn: 'root' }); }
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingAuthService, decorators: [{
|
|
19
19
|
type: Injectable,
|
|
20
20
|
args: [{
|
|
21
21
|
providedIn: 'root',
|
|
@@ -35,10 +35,10 @@ class DaffTestingLoginService {
|
|
|
35
35
|
logout() {
|
|
36
36
|
return of(undefined);
|
|
37
37
|
}
|
|
38
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
39
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
38
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingLoginService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingLoginService, providedIn: 'root' }); }
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingLoginService, decorators: [{
|
|
42
42
|
type: Injectable,
|
|
43
43
|
args: [{
|
|
44
44
|
providedIn: 'root',
|
|
@@ -58,10 +58,10 @@ class DaffTestingRegisterService {
|
|
|
58
58
|
registerOnly(registration) {
|
|
59
59
|
return of(undefined);
|
|
60
60
|
}
|
|
61
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
62
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
61
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingRegisterService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
62
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingRegisterService, providedIn: 'root' }); }
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingRegisterService, decorators: [{
|
|
65
65
|
type: Injectable,
|
|
66
66
|
args: [{
|
|
67
67
|
providedIn: 'root',
|
|
@@ -84,10 +84,10 @@ class DaffTestingResetPasswordService {
|
|
|
84
84
|
sendResetEmail() {
|
|
85
85
|
return of(undefined);
|
|
86
86
|
}
|
|
87
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
88
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
87
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingResetPasswordService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
88
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingResetPasswordService, providedIn: 'root' }); }
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTestingResetPasswordService, decorators: [{
|
|
91
91
|
type: Injectable,
|
|
92
92
|
args: [{
|
|
93
93
|
providedIn: 'root',
|
|
@@ -106,11 +106,11 @@ class DaffAuthTestingDriverModule {
|
|
|
106
106
|
],
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
110
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
111
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
109
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
110
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
|
|
111
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
|
|
112
112
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffAuthTestingDriverModule, decorators: [{
|
|
114
114
|
type: NgModule,
|
|
115
115
|
args: [{
|
|
116
116
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver-testing.mjs","sources":["../../../libs/auth/driver/testing/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/testing/src/drivers/login/login.service.ts","../../../libs/auth/driver/testing/src/drivers/register/register.service.ts","../../../libs/auth/driver/testing/src/drivers/reset-password/service.ts","../../../libs/auth/driver/testing/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/testing/src/daffodil-auth-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingAuthService implements DaffAuthServiceInterface {\n check(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingLoginService implements DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> {\n constructor(private factory: DaffAuthTokenFactory) {}\n\n login(loginInfo: DaffLoginInfo): Observable<DaffAuthToken> {\n return of(this.factory.create());\n }\n\n logout(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAccountRegistration,\n DaffLoginInfo,\n} from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n registerOnly(registration: DaffLoginInfo): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n resetPassword(): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return of(undefined);\n }\n\n sendResetEmail(): Observable<void> {\n return of(undefined);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffLoginDriver,\n provideDaffRegisterDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffTestingAuthService } from './auth/auth.service';\nimport { DaffTestingLoginService } from './login/login.service';\nimport { DaffTestingRegisterService } from './register/register.service';\nimport { DaffTestingResetPasswordService } from './reset-password/service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthTestingDriverModule> {\n return {\n ngModule: DaffAuthTestingDriverModule,\n providers: [\n provideDaffLoginDriver(DaffTestingLoginService),\n provideDaffRegisterDriver(DaffTestingRegisterService),\n provideDaffAuthDriver(DaffTestingAuthService),\n provideDaffResetPasswordDriver(DaffTestingResetPasswordService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;MAIU,sBAAsB,CAAA;IACjC,KAAK,GAAA;AACH,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB;
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver-testing.mjs","sources":["../../../libs/auth/driver/testing/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/testing/src/drivers/login/login.service.ts","../../../libs/auth/driver/testing/src/drivers/register/register.service.ts","../../../libs/auth/driver/testing/src/drivers/reset-password/service.ts","../../../libs/auth/driver/testing/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/testing/src/daffodil-auth-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingAuthService implements DaffAuthServiceInterface {\n check(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingLoginService implements DaffLoginServiceInterface<DaffLoginInfo, DaffAuthToken> {\n constructor(private factory: DaffAuthTokenFactory) {}\n\n login(loginInfo: DaffLoginInfo): Observable<DaffAuthToken> {\n return of(this.factory.create());\n }\n\n logout(): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAccountRegistration,\n DaffLoginInfo,\n} from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n registerOnly(registration: DaffLoginInfo): Observable<void> {\n return of(undefined);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffAuthTokenFactory } from '@daffodil/auth/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private authTokenFactory: DaffAuthTokenFactory,\n ) {}\n\n resetPassword(): Observable<string> {\n return of(this.authTokenFactory.create().token);\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return of(undefined);\n }\n\n sendResetEmail(): Observable<void> {\n return of(undefined);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffLoginDriver,\n provideDaffRegisterDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffTestingAuthService } from './auth/auth.service';\nimport { DaffTestingLoginService } from './login/login.service';\nimport { DaffTestingRegisterService } from './register/register.service';\nimport { DaffTestingResetPasswordService } from './reset-password/service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthTestingDriverModule> {\n return {\n ngModule: DaffAuthTestingDriverModule,\n providers: [\n provideDaffLoginDriver(DaffTestingLoginService),\n provideDaffRegisterDriver(DaffTestingRegisterService),\n provideDaffAuthDriver(DaffTestingAuthService),\n provideDaffResetPasswordDriver(DaffTestingResetPasswordService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;MAIU,sBAAsB,CAAA;IACjC,KAAK,GAAA;AACH,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB;kIAHW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAA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