@daffodil/auth 0.88.1 → 0.90.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.
Files changed (197) hide show
  1. package/driver/in-memory/index.d.ts +84 -1
  2. package/driver/index.d.ts +135 -1
  3. package/driver/magento/index.d.ts +132 -1
  4. package/driver/testing/index.d.ts +49 -1
  5. package/fesm2022/daffodil-auth-driver-in-memory.mjs +19 -19
  6. package/fesm2022/daffodil-auth-driver-in-memory.mjs.map +1 -1
  7. package/fesm2022/daffodil-auth-driver-magento.mjs +22 -22
  8. package/fesm2022/daffodil-auth-driver-magento.mjs.map +1 -1
  9. package/fesm2022/daffodil-auth-driver-testing.mjs +16 -16
  10. package/fesm2022/daffodil-auth-driver-testing.mjs.map +1 -1
  11. package/fesm2022/daffodil-auth-driver.mjs +3 -3
  12. package/fesm2022/daffodil-auth-driver.mjs.map +1 -1
  13. package/fesm2022/daffodil-auth-routing.mjs +20 -20
  14. package/fesm2022/daffodil-auth-routing.mjs.map +1 -1
  15. package/fesm2022/daffodil-auth-state-testing.mjs +16 -16
  16. package/fesm2022/daffodil-auth-state-testing.mjs.map +1 -1
  17. package/fesm2022/daffodil-auth-state.mjs +28 -28
  18. package/fesm2022/daffodil-auth-state.mjs.map +1 -1
  19. package/fesm2022/daffodil-auth-testing.mjs +9 -9
  20. package/fesm2022/daffodil-auth-testing.mjs.map +1 -1
  21. package/fesm2022/daffodil-auth.mjs +3 -3
  22. package/fesm2022/daffodil-auth.mjs.map +1 -1
  23. package/index.d.ts +76 -1
  24. package/package.json +1 -1
  25. package/routing/index.d.ts +104 -1
  26. package/state/index.d.ts +424 -1
  27. package/state/testing/index.d.ts +59 -1
  28. package/testing/index.d.ts +38 -1
  29. package/driver/constants/public_api.d.ts +0 -1
  30. package/driver/constants/unauthenticated-error-codes.d.ts +0 -10
  31. package/driver/errors/authentication-failed.d.ts +0 -6
  32. package/driver/errors/codes.enum.d.ts +0 -6
  33. package/driver/errors/invalid-api-response.d.ts +0 -6
  34. package/driver/errors/map.d.ts +0 -13
  35. package/driver/errors/public_api.d.ts +0 -6
  36. package/driver/errors/registration-failed.d.ts +0 -9
  37. package/driver/errors/unauthorized.d.ts +0 -6
  38. package/driver/in-memory/backend/auth.service.d.ts +0 -24
  39. package/driver/in-memory/collection-name.const.d.ts +0 -1
  40. package/driver/in-memory/drivers/auth/auth.service.d.ts +0 -16
  41. package/driver/in-memory/drivers/auth-driver.module.d.ts +0 -9
  42. package/driver/in-memory/drivers/login/login.service.d.ts +0 -18
  43. package/driver/in-memory/drivers/public_api.d.ts +0 -4
  44. package/driver/in-memory/drivers/register/register.service.d.ts +0 -20
  45. package/driver/in-memory/drivers/reset-password/service.d.ts +0 -21
  46. package/driver/in-memory/models/db-customer.type.d.ts +0 -8
  47. package/driver/in-memory/public_api.d.ts +0 -2
  48. package/driver/interfaces/auth-service.interface.d.ts +0 -8
  49. package/driver/interfaces/login-service.interface.d.ts +0 -15
  50. package/driver/interfaces/public_api.d.ts +0 -4
  51. package/driver/interfaces/register-service.interface.d.ts +0 -18
  52. package/driver/interfaces/reset-password-service.interface.d.ts +0 -17
  53. package/driver/magento/apollo-bearer-token-link-generator.d.ts +0 -16
  54. package/driver/magento/auth-driver.module.d.ts +0 -9
  55. package/driver/magento/auth.service.d.ts +0 -14
  56. package/driver/magento/errors/codes.d.ts +0 -5
  57. package/driver/magento/errors/map.d.ts +0 -2
  58. package/driver/magento/errors/transform.d.ts +0 -1
  59. package/driver/magento/login.service.d.ts +0 -18
  60. package/driver/magento/models/public_api.d.ts +0 -4
  61. package/driver/magento/models/response/auth.d.ts +0 -3
  62. package/driver/magento/models/response/register.type.d.ts +0 -7
  63. package/driver/magento/models/response/reset-password.type.d.ts +0 -3
  64. package/driver/magento/models/response/send-reset-email.type.d.ts +0 -3
  65. package/driver/magento/public_api.d.ts +0 -8
  66. package/driver/magento/queries/check-token.d.ts +0 -1
  67. package/driver/magento/queries/create-customer.d.ts +0 -1
  68. package/driver/magento/queries/generate-token.d.ts +0 -1
  69. package/driver/magento/queries/public_api.d.ts +0 -7
  70. package/driver/magento/queries/reset-password.d.ts +0 -1
  71. package/driver/magento/queries/responses/check-token-response.d.ts +0 -5
  72. package/driver/magento/queries/responses/generate-token-response.d.ts +0 -4
  73. package/driver/magento/queries/responses/public_api.d.ts +0 -3
  74. package/driver/magento/queries/responses/revoke-customer-token-response.d.ts +0 -5
  75. package/driver/magento/queries/revoke-customer-token.d.ts +0 -1
  76. package/driver/magento/queries/send-reset-email.d.ts +0 -1
  77. package/driver/magento/register.service.d.ts +0 -18
  78. package/driver/magento/reset-password.service.d.ts +0 -19
  79. package/driver/magento/transforms/auth-transformer.service.d.ts +0 -16
  80. package/driver/magento/validators/check-token.d.ts +0 -3
  81. package/driver/magento/validators/generate-token.d.ts +0 -3
  82. package/driver/magento/validators/public_api.d.ts +0 -5
  83. package/driver/magento/validators/reset-password.d.ts +0 -3
  84. package/driver/magento/validators/revoke-token.d.ts +0 -3
  85. package/driver/magento/validators/send-reset-email.d.ts +0 -3
  86. package/driver/public_api.d.ts +0 -4
  87. package/driver/services/auth-check.service.d.ts +0 -17
  88. package/driver/services/public_api.d.ts +0 -1
  89. package/driver/testing/drivers/auth/auth.service.d.ts +0 -11
  90. package/driver/testing/drivers/auth-driver.module.d.ts +0 -9
  91. package/driver/testing/drivers/login/login.service.d.ts +0 -16
  92. package/driver/testing/drivers/public_api.d.ts +0 -4
  93. package/driver/testing/drivers/register/register.service.d.ts +0 -16
  94. package/driver/testing/drivers/reset-password/service.d.ts +0 -17
  95. package/driver/testing/public_api.d.ts +0 -1
  96. package/errors/codes.enum.d.ts +0 -3
  97. package/errors/map.d.ts +0 -7
  98. package/errors/missing-token.d.ts +0 -10
  99. package/errors/public_api.d.ts +0 -3
  100. package/models/account-registration.d.ts +0 -15
  101. package/models/auth-token.d.ts +0 -3
  102. package/models/login-info.d.ts +0 -4
  103. package/models/public_api.d.ts +0 -4
  104. package/models/reset-password-info.type.d.ts +0 -14
  105. package/public_api.d.ts +0 -3
  106. package/routing/config/default.d.ts +0 -2
  107. package/routing/config/interface.d.ts +0 -29
  108. package/routing/config/public_api.d.ts +0 -3
  109. package/routing/config/token.d.ts +0 -2
  110. package/routing/effects/redirect.effects.d.ts +0 -18
  111. package/routing/guards/guest-only-guard-redirect.token.d.ts +0 -1
  112. package/routing/guards/guest-only.guard.d.ts +0 -20
  113. package/routing/guards/member-only-guard-redirect.token.d.ts +0 -1
  114. package/routing/guards/member-only.guard.d.ts +0 -20
  115. package/routing/guards/public_api.d.ts +0 -5
  116. package/routing/guards/reset-password.guard.d.ts +0 -13
  117. package/routing/helpers/public_api.d.ts +0 -1
  118. package/routing/helpers/redirect-unauthenticated-hook-factory.d.ts +0 -4
  119. package/routing/module.d.ts +0 -9
  120. package/routing/public_api.d.ts +0 -5
  121. package/routing/redirect.module.d.ts +0 -7
  122. package/state/actions/auth.actions.d.ts +0 -56
  123. package/state/actions/login.actions.d.ts +0 -64
  124. package/state/actions/public_api.d.ts +0 -4
  125. package/state/actions/register.actions.d.ts +0 -40
  126. package/state/actions/reset-password.actions.d.ts +0 -74
  127. package/state/auth-state.module.d.ts +0 -11
  128. package/state/config/default.d.ts +0 -2
  129. package/state/config/public_api.d.ts +0 -3
  130. package/state/config/token.d.ts +0 -2
  131. package/state/config/type.d.ts +0 -7
  132. package/state/effects/auth.effects.d.ts +0 -28
  133. package/state/effects/login.effects.d.ts +0 -17
  134. package/state/effects/register.effects.d.ts +0 -17
  135. package/state/effects/reset-password.effects.d.ts +0 -18
  136. package/state/facades/auth/facade.d.ts +0 -19
  137. package/state/facades/auth/facade.interface.d.ts +0 -11
  138. package/state/facades/auth/public_api.d.ts +0 -2
  139. package/state/facades/login/facade.d.ts +0 -18
  140. package/state/facades/login/facade.interface.d.ts +0 -7
  141. package/state/facades/login/public_api.d.ts +0 -2
  142. package/state/facades/public_api.d.ts +0 -4
  143. package/state/facades/register/facade.d.ts +0 -18
  144. package/state/facades/register/facade.interface.d.ts +0 -7
  145. package/state/facades/register/public_api.d.ts +0 -2
  146. package/state/facades/reset-password/facade.d.ts +0 -20
  147. package/state/facades/reset-password/facade.interface.d.ts +0 -9
  148. package/state/facades/reset-password/public_api.d.ts +0 -2
  149. package/state/injection-tokens/error-matcher.token.d.ts +0 -2
  150. package/state/injection-tokens/public_api.d.ts +0 -2
  151. package/state/injection-tokens/unauthenticated/hook.token.d.ts +0 -2
  152. package/state/injection-tokens/unauthenticated/hook.type.d.ts +0 -9
  153. package/state/injection-tokens/unauthenticated/hooks.token.d.ts +0 -2
  154. package/state/injection-tokens/unauthenticated/public_api.d.ts +0 -2
  155. package/state/public_api.d.ts +0 -7
  156. package/state/reducers/auth/auth-initial-state.d.ts +0 -2
  157. package/state/reducers/auth/auth-reducer-state.interface.d.ts +0 -4
  158. package/state/reducers/auth/auth.reducer.d.ts +0 -3
  159. package/state/reducers/auth/public_api.d.ts +0 -3
  160. package/state/reducers/auth-feature-state.interface.d.ts +0 -14
  161. package/state/reducers/auth-reducers.d.ts +0 -3
  162. package/state/reducers/auth-store-feature-key.d.ts +0 -1
  163. package/state/reducers/login/login-initial-state.d.ts +0 -2
  164. package/state/reducers/login/login-reducer-state.interface.d.ts +0 -2
  165. package/state/reducers/login/login.reducer.d.ts +0 -4
  166. package/state/reducers/login/public_api.d.ts +0 -3
  167. package/state/reducers/public_api.d.ts +0 -8
  168. package/state/reducers/register/public_api.d.ts +0 -3
  169. package/state/reducers/register/register-initial-state.d.ts +0 -2
  170. package/state/reducers/register/register-reducer-state.interface.d.ts +0 -2
  171. package/state/reducers/register/register.reducer.d.ts +0 -4
  172. package/state/reducers/reset-password/initial-state.d.ts +0 -2
  173. package/state/reducers/reset-password/public_api.d.ts +0 -3
  174. package/state/reducers/reset-password/reducer.d.ts +0 -4
  175. package/state/reducers/reset-password/state.interface.d.ts +0 -5
  176. package/state/reducers/token/extra.token.d.ts +0 -3
  177. package/state/reducers/token/public_api.d.ts +0 -1
  178. package/state/reducers/token/reducers.token.d.ts +0 -3
  179. package/state/selectors/auth/auth.selector.d.ts +0 -8
  180. package/state/selectors/auth-all.selector.d.ts +0 -10
  181. package/state/selectors/auth-feature.selector.d.ts +0 -6
  182. package/state/selectors/login/login.selector.d.ts +0 -7
  183. package/state/selectors/public_api.d.ts +0 -5
  184. package/state/selectors/register/register.selector.d.ts +0 -7
  185. package/state/selectors/reset-password/selector.d.ts +0 -9
  186. package/state/testing/auth-testing.module.d.ts +0 -6
  187. package/state/testing/mock-auth-facade.d.ts +0 -16
  188. package/state/testing/mock-login-facade.d.ts +0 -15
  189. package/state/testing/mock-register-facade.d.ts +0 -15
  190. package/state/testing/mock-reset-password-facade.d.ts +0 -16
  191. package/state/testing/public_api.d.ts +0 -5
  192. package/storage/auth-storage.service.d.ts +0 -12
  193. package/testing/factories/account-registration.factory.d.ts +0 -15
  194. package/testing/factories/auth-token.factory.d.ts +0 -11
  195. package/testing/factories/public_api.d.ts +0 -3
  196. package/testing/factories/reset-password-info.factory.d.ts +0 -13
  197. package/testing/public_api.d.ts +0 -1
@@ -152,10 +152,10 @@ class DaffMagentoAuthService {
152
152
  fetchPolicy: 'no-cache',
153
153
  }).pipe(map(validateCheckTokenResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
154
154
  }
155
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
156
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthService, providedIn: 'root' }); }
155
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
156
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthService, providedIn: 'root' }); }
157
157
  }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthService, decorators: [{
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthService, decorators: [{
159
159
  type: Injectable,
160
160
  args: [{
161
161
  providedIn: 'root',
@@ -176,10 +176,10 @@ class DaffMagentoAuthTransformerService {
176
176
  token: auth.token,
177
177
  };
178
178
  }
179
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthTransformerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
180
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthTransformerService, providedIn: 'root' }); }
179
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthTransformerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
180
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthTransformerService, providedIn: 'root' }); }
181
181
  }
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoAuthTransformerService, decorators: [{
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoAuthTransformerService, decorators: [{
183
183
  type: Injectable,
184
184
  args: [{
185
185
  providedIn: 'root',
@@ -206,10 +206,10 @@ class DaffMagentoLoginService {
206
206
  logout() {
207
207
  return this.apollo.mutate({ mutation: revokeCustomerTokenMutation }).pipe(map(validateRevokeTokenResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
208
208
  }
209
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoLoginService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoAuthTransformerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
210
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoLoginService, providedIn: 'root' }); }
209
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoLoginService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoAuthTransformerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
210
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoLoginService, providedIn: 'root' }); }
211
211
  }
212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoLoginService, decorators: [{
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoLoginService, decorators: [{
213
213
  type: Injectable,
214
214
  args: [{
215
215
  providedIn: 'root',
@@ -244,10 +244,10 @@ class DaffMagentoRegisterService {
244
244
  return;
245
245
  }), catchError(err => throwError(() => transformMagentoAuthError(err))));
246
246
  }
247
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoRegisterService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
248
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoRegisterService, providedIn: 'root' }); }
247
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoRegisterService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
248
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoRegisterService, providedIn: 'root' }); }
249
249
  }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoRegisterService, decorators: [{
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoRegisterService, decorators: [{
251
251
  type: Injectable,
252
252
  args: [{
253
253
  providedIn: 'root',
@@ -283,10 +283,10 @@ class DaffMagentoResetPasswordService {
283
283
  },
284
284
  }).pipe(map(validateSendResetEmailResponse), map(() => undefined), catchError(err => throwError(() => transformMagentoAuthError(err))));
285
285
  }
286
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoResetPasswordService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
287
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoResetPasswordService, providedIn: 'root' }); }
286
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoResetPasswordService, deps: [{ token: i1$1.DaffQueuedApollo }, { token: DaffMagentoLoginService }], target: i0.ɵɵFactoryTarget.Injectable }); }
287
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoResetPasswordService, providedIn: 'root' }); }
288
288
  }
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffMagentoResetPasswordService, decorators: [{
289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffMagentoResetPasswordService, decorators: [{
290
290
  type: Injectable,
291
291
  args: [{
292
292
  providedIn: 'root',
@@ -305,11 +305,11 @@ class DaffAuthMagentoDriverModule {
305
305
  ],
306
306
  };
307
307
  }
308
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
309
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
310
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
308
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
309
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
310
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthMagentoDriverModule, imports: [CommonModule] }); }
311
311
  }
312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthMagentoDriverModule, decorators: [{
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthMagentoDriverModule, decorators: [{
313
313
  type: NgModule,
314
314
  args: [{
315
315
  imports: [
@@ -345,10 +345,10 @@ class MagentoAuthApolloBearerTokenLinkGenerator {
345
345
  return forward(operation);
346
346
  });
347
347
  }
348
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, deps: [{ token: i1$2.DaffAuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
349
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, providedIn: 'root' }); }
348
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, deps: [{ token: i1$2.DaffAuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
349
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, providedIn: 'root' }); }
350
350
  }
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, decorators: [{
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MagentoAuthApolloBearerTokenLinkGenerator, decorators: [{
352
352
  type: Injectable,
353
353
  args: [{
354
354
  providedIn: 'root',
@@ -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 { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\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,GAItC,EAAA,CAAA,CAAA;;ACKM,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,OAAO,QAAQ;;SACV;AACL,QAAA,MAAM,IAAI,+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AACP,wBAAA,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC,OAAO;wBACjC,aAAa,EAAE,CAAU,OAAA,EAAA,KAAK,CAAE,CAAA;AACjC,qBAAA;AACF,iBAAA,CAAC;;AAEJ,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC;AAC3B,SAAC,CAAC;;kIAtBO,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,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;;;ACbD;;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 { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\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,6B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,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;;;ACbD;;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: "19.2.11", ngImport: i0, type: DaffTestingAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingAuthService, providedIn: 'root' }); }
15
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTestingAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTestingAuthService, providedIn: 'root' }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingAuthService, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "19.2.11", ngImport: i0, type: DaffTestingLoginService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingLoginService, providedIn: 'root' }); }
38
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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.1", ngImport: i0, type: DaffTestingLoginService, providedIn: 'root' }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingLoginService, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "19.2.11", ngImport: i0, type: DaffTestingRegisterService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
62
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingRegisterService, providedIn: 'root' }); }
61
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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.1", ngImport: i0, type: DaffTestingRegisterService, providedIn: 'root' }); }
63
63
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingRegisterService, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "19.2.11", ngImport: i0, type: DaffTestingResetPasswordService, deps: [{ token: i1.DaffAuthTokenFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
88
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingResetPasswordService, providedIn: 'root' }); }
87
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", 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.1", ngImport: i0, type: DaffTestingResetPasswordService, providedIn: 'root' }); }
89
89
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffTestingResetPasswordService, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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: "19.2.11", ngImport: i0, type: DaffAuthTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
110
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
111
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
109
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
110
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
111
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthTestingDriverModule, imports: [CommonModule] }); }
112
112
  }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthTestingDriverModule, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", 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;;kIAFX,sBAAsB,EAAA,IAAA,E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,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
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(DaffTestingReset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BAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAHpC,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBALvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -101,10 +101,10 @@ class DaffAuthDriverTokenCheck {
101
101
  return this.driver.check();
102
102
  }));
103
103
  }
104
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthDriverTokenCheck, deps: [{ token: i1.DaffAuthStorageService }, { token: DaffAuthDriver }], target: i0.ɵɵFactoryTarget.Injectable }); }
105
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthDriverTokenCheck, providedIn: 'root' }); }
104
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthDriverTokenCheck, deps: [{ token: i1.DaffAuthStorageService }, { token: DaffAuthDriver }], target: i0.ɵɵFactoryTarget.Injectable }); }
105
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthDriverTokenCheck, providedIn: 'root' }); }
106
106
  }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthDriverTokenCheck, decorators: [{
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthDriverTokenCheck, decorators: [{
108
108
  type: Injectable,
109
109
  args: [{
110
110
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-auth-driver.mjs","sources":["../../../libs/auth/driver/src/interfaces/auth-service.interface.ts","../../../libs/auth/driver/src/interfaces/login-service.interface.ts","../../../libs/auth/driver/src/interfaces/register-service.interface.ts","../../../libs/auth/driver/src/interfaces/reset-password-service.interface.ts","../../../libs/auth/driver/src/errors/codes.enum.ts","../../../libs/auth/driver/src/errors/unauthorized.ts","../../../libs/auth/driver/src/errors/authentication-failed.ts","../../../libs/auth/driver/src/errors/registration-failed.ts","../../../libs/auth/driver/src/errors/invalid-api-response.ts","../../../libs/auth/driver/src/errors/map.ts","../../../libs/auth/driver/src/services/auth-check.service.ts","../../../libs/auth/driver/src/constants/unauthenticated-error-codes.ts","../../../libs/auth/driver/src/daffodil-auth-driver.ts"],"sourcesContent":["import { Observable } from 'rxjs';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffAuthServiceInterface {\n /**\n * Checks the validity of an auth token.\n */\n check(): Observable<void>;\n}\n\nexport const {\n token: DaffAuthDriver,\n /**\n * Provider function for {@link DaffAuthDriver}.\n */\n provider: provideDaffAuthDriver,\n} = createSingletonInjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');\n","import { Observable } from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffLoginServiceInterface<\n TRequest extends DaffLoginInfo = DaffLoginInfo,\n TResponse extends DaffAuthToken = DaffAuthToken\n> {\n /**\n * Logs the user in.\n *\n * @returns An access token.\n */\n login(loginInfo: TRequest): Observable<TResponse>;\n\n /**\n * Logs the user out by revoking their access token.\n */\n logout(): Observable<void>;\n}\n\nexport const {\n token: DaffLoginDriver,\n /**\n * Provider function for {@link DaffLoginDriver}.\n */\n provider: provideDaffLoginDriver,\n} = createSingletonInjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');\n","import { Observable } from 'rxjs';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffRegisterServiceInterface<\n TRequest extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n\n /**\n * Registers an account for the specified customer and logs the customer in.\n *\n * @param registration The account registration info.\n * @return The authentication token.\n */\n register(registration: TRequest): Observable<string>;\n\n /**\n * Registers an account for the specified customer but does not log the customer in.\n *\n * @param registration The account registration info.\n */\n registerOnly(registration: TRequest): Observable<void>;\n}\n\nexport const {\n token: DaffRegisterDriver,\n /**\n * Provider function for {@link DaffRegisterDriver}.\n */\n provider: provideDaffRegisterDriver,\n} = createSingletonInjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');\n","import { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffResetPasswordServiceInterface<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n\n /**\n * Resets password for the specified customer and logs in.\n */\n resetPassword(info: T): Observable<string>;\n\n /**\n * Resets password for the specified customer.\n */\n resetPasswordOnly(info: T): Observable<void>;\n\n /**\n * Send a password reset email to the specified email address.\n */\n sendResetEmail(email: string): Observable<void>;\n}\n\nexport const {\n token: DaffResetPasswordDriver,\n /**\n * Provider function for {@link DaffResetPasswordDriver}.\n */\n provider: provideDaffResetPasswordDriver,\n} = createSingletonInjectionToken<DaffResetPasswordServiceInterface>('DaffResetPasswordDriver');\n","export enum DaffAuthDriverErrorCodes {\n AUTHENTICATION_FAILED = 'DAFF_AUTH_AUTHENTICATION_FAILED',\n INVALID_API_RESPONSE = 'DAFF_AUTH_INVALID_API_RESPONSE',\n REGISTRATION_FAILED = 'DAFF_AUTH_REGISTRATION_FAILED',\n UNAUTHORIZED = 'DAFF_AUTH_UNAUTHORIZED',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffUnauthorizedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.UNAUTHORIZED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthenticationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when registration failed.\n */\nexport class DaffRegistrationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.REGISTRATION_FAILED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.INVALID_API_RESPONSE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthenticationFailedError } from './authentication-failed';\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\nimport { DaffAuthInvalidAPIResponseError } from './invalid-api-response';\nimport { DaffRegistrationFailedError } from './registration-failed';\nimport { DaffUnauthorizedError } from './unauthorized';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthDriverErrorMap = {\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [DaffAuthDriverErrorCodes.INVALID_API_RESPONSE]: DaffAuthInvalidAPIResponseError,\n [DaffAuthDriverErrorCodes.REGISTRATION_FAILED]: DaffRegistrationFailedError,\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: DaffUnauthorizedError,\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n Observable,\n of,\n switchMap,\n throwError,\n} from 'rxjs';\n\nimport {\n DaffAuthStorageService,\n DaffAuthMissingTokenError,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '../interfaces/public_api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthDriverTokenCheck {\n constructor(\n private storage: DaffAuthStorageService,\n @Inject(DaffAuthDriver) private driver: DaffAuthServiceInterface,\n ) {}\n\n /**\n * Checks if the auth token in storage is valid.\n * If there is not an auth token in storage, the driver is not called\n * and an error is immediately thrown.\n */\n check(): Observable<void> {\n return of(null).pipe(\n switchMap(() => {\n const token = this.storage.getAuthToken();\n\n if (!token) {\n return throwError(() => new DaffAuthMissingTokenError('There is not an auth token in storage'));\n }\n\n return this.driver.check();\n }),\n );\n }\n}\n","import { DaffAuthDriverErrorCodes } from '../errors/public_api';\n\n/**\n * The error codes that indicate that the user definitely should not be in an unauthenticated state\n * and if an auth token exists in storage, it is invalid.\n * These are contrasted to network failures and other sporadic and generic errors that aren't\n * a guarantee of the token's invalidity.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES = {\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: true,\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: true,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAWO,MAAM,EACX,KAAK,EAAE,cAAc;AACrB;;AAEG;AACH,QAAQ,EAAE,qBAAqB,GAChC,GAAG,6BAA6B,CAA2B,gBAAgB;;ACQrE,MAAM,EACX,KAAK,EAAE,eAAe;AACtB;;AAEG;AACH,QAAQ,EAAE,sBAAsB,GACjC,GAAG,6BAA6B,CAA4B,iBAAiB;;ACNvE,MAAM,EACX,KAAK,EAAE,kBA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AA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;;4FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAII,MAAM;2BAAC,cAAc;;;ACzB1B;;;;;AAKG;AACU,MAAA,qCAAqC,GAAG;AACnD,IAAA,CAAC,wBAAwB,CAAC,YAAY,GAAG,IAAI;AAC7C,IAAA,CAAC,wBAAwB,CAAC,qBAAqB,GAAG,IAAI;;;ACVxD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-auth-driver.mjs","sources":["../../../libs/auth/driver/src/interfaces/auth-service.interface.ts","../../../libs/auth/driver/src/interfaces/login-service.interface.ts","../../../libs/auth/driver/src/interfaces/register-service.interface.ts","../../../libs/auth/driver/src/interfaces/reset-password-service.interface.ts","../../../libs/auth/driver/src/errors/codes.enum.ts","../../../libs/auth/driver/src/errors/unauthorized.ts","../../../libs/auth/driver/src/errors/authentication-failed.ts","../../../libs/auth/driver/src/errors/registration-failed.ts","../../../libs/auth/driver/src/errors/invalid-api-response.ts","../../../libs/auth/driver/src/errors/map.ts","../../../libs/auth/driver/src/services/auth-check.service.ts","../../../libs/auth/driver/src/constants/unauthenticated-error-codes.ts","../../../libs/auth/driver/src/daffodil-auth-driver.ts"],"sourcesContent":["import { Observable } from 'rxjs';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffAuthServiceInterface {\n /**\n * Checks the validity of an auth token.\n */\n check(): Observable<void>;\n}\n\nexport const {\n token: DaffAuthDriver,\n /**\n * Provider function for {@link DaffAuthDriver}.\n */\n provider: provideDaffAuthDriver,\n} = createSingletonInjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');\n","import { Observable } from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffLoginServiceInterface<\n TRequest extends DaffLoginInfo = DaffLoginInfo,\n TResponse extends DaffAuthToken = DaffAuthToken\n> {\n /**\n * Logs the user in.\n *\n * @returns An access token.\n */\n login(loginInfo: TRequest): Observable<TResponse>;\n\n /**\n * Logs the user out by revoking their access token.\n */\n logout(): Observable<void>;\n}\n\nexport const {\n token: DaffLoginDriver,\n /**\n * Provider function for {@link DaffLoginDriver}.\n */\n provider: provideDaffLoginDriver,\n} = createSingletonInjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');\n","import { Observable } from 'rxjs';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffRegisterServiceInterface<\n TRequest extends DaffAccountRegistration = DaffAccountRegistration,\n> {\n\n /**\n * Registers an account for the specified customer and logs the customer in.\n *\n * @param registration The account registration info.\n * @return The authentication token.\n */\n register(registration: TRequest): Observable<string>;\n\n /**\n * Registers an account for the specified customer but does not log the customer in.\n *\n * @param registration The account registration info.\n */\n registerOnly(registration: TRequest): Observable<void>;\n}\n\nexport const {\n token: DaffRegisterDriver,\n /**\n * Provider function for {@link DaffRegisterDriver}.\n */\n provider: provideDaffRegisterDriver,\n} = createSingletonInjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');\n","import { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nexport interface DaffResetPasswordServiceInterface<\n T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo,\n> {\n\n /**\n * Resets password for the specified customer and logs in.\n */\n resetPassword(info: T): Observable<string>;\n\n /**\n * Resets password for the specified customer.\n */\n resetPasswordOnly(info: T): Observable<void>;\n\n /**\n * Send a password reset email to the specified email address.\n */\n sendResetEmail(email: string): Observable<void>;\n}\n\nexport const {\n token: DaffResetPasswordDriver,\n /**\n * Provider function for {@link DaffResetPasswordDriver}.\n */\n provider: provideDaffResetPasswordDriver,\n} = createSingletonInjectionToken<DaffResetPasswordServiceInterface>('DaffResetPasswordDriver');\n","export enum DaffAuthDriverErrorCodes {\n AUTHENTICATION_FAILED = 'DAFF_AUTH_AUTHENTICATION_FAILED',\n INVALID_API_RESPONSE = 'DAFF_AUTH_INVALID_API_RESPONSE',\n REGISTRATION_FAILED = 'DAFF_AUTH_REGISTRATION_FAILED',\n UNAUTHORIZED = 'DAFF_AUTH_UNAUTHORIZED',\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffUnauthorizedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.UNAUTHORIZED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthenticationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\n/**\n * An error thrown when registration failed.\n */\nexport class DaffRegistrationFailedError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.REGISTRATION_FAILED;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\n\nexport class DaffAuthInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffAuthDriverErrorCodes.INVALID_API_RESPONSE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { DaffAuthenticationFailedError } from './authentication-failed';\nimport { DaffAuthDriverErrorCodes } from './codes.enum';\nimport { DaffAuthInvalidAPIResponseError } from './invalid-api-response';\nimport { DaffRegistrationFailedError } from './registration-failed';\nimport { DaffUnauthorizedError } from './unauthorized';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffAuthDriverErrorMap = {\n [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [DaffAuthDriverErrorCodes.INVALID_API_RESPONSE]: DaffAuthInvalidAPIResponseError,\n [DaffAuthDriverErrorCodes.REGISTRATION_FAILED]: DaffRegistrationFailedError,\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: DaffUnauthorizedError,\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n Observable,\n of,\n switchMap,\n throwError,\n} from 'rxjs';\n\nimport {\n DaffAuthStorageService,\n DaffAuthMissingTokenError,\n} from '@daffodil/auth';\n\nimport {\n DaffAuthDriver,\n DaffAuthServiceInterface,\n} from '../interfaces/public_api';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAuthDriverTokenCheck {\n constructor(\n private storage: DaffAuthStorageService,\n @Inject(DaffAuthDriver) private driver: DaffAuthServiceInterface,\n ) {}\n\n /**\n * Checks if the auth token in storage is valid.\n * If there is not an auth token in storage, the driver is not called\n * and an error is immediately thrown.\n */\n check(): Observable<void> {\n return of(null).pipe(\n switchMap(() => {\n const token = this.storage.getAuthToken();\n\n if (!token) {\n return throwError(() => new DaffAuthMissingTokenError('There is not an auth token in storage'));\n }\n\n return this.driver.check();\n }),\n );\n }\n}\n","import { DaffAuthDriverErrorCodes } from '../errors/public_api';\n\n/**\n * The error codes that indicate that the user definitely should not be in an unauthenticated state\n * and if an auth token exists in storage, it is invalid.\n * These are contrasted to network failures and other sporadic and generic errors that aren't\n * a guarantee of the token's invalidity.\n */\nexport const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES = {\n [DaffAuthDriverErrorCodes.UNAUTHORIZED]: true,\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,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QAC5B,CAAC,CAAC,CACH;IACH;AAvBW,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,wDAGzB,cAAc,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAHb,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,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAII,MAAM;2BAAC,cAAc;;;ACzB1B;;;;;AAKG;AACI,MAAM,qCAAqC,GAAG;AACnD,IAAA,CAAC,wBAAwB,CAAC,YAAY,GAAG,IAAI;AAC7C,IAAA,CAAC,wBAAwB,CAAC,qBAAqB,GAAG,IAAI;;;ACVxD;;AAEG;;;;"}
@@ -44,10 +44,10 @@ class MemberOnlyGuard {
44
44
  return of(false);
45
45
  }));
46
46
  }
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MemberOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthMemberOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MemberOnlyGuard, providedIn: 'any' }); }
47
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MemberOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthMemberOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MemberOnlyGuard, providedIn: 'any' }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MemberOnlyGuard, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MemberOnlyGuard, decorators: [{
51
51
  type: Injectable,
52
52
  args: [{
53
53
  providedIn: 'any',
@@ -90,10 +90,10 @@ class GuestOnlyGuard {
90
90
  return of(true);
91
91
  }));
92
92
  }
93
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: GuestOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthGuestOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
94
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: GuestOnlyGuard, providedIn: 'any' }); }
93
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: GuestOnlyGuard, deps: [{ token: i1.DaffAuthDriverTokenCheck }, { token: i2.DaffAuthStorageService }, { token: i3.Router }, { token: i4.Store }, { token: DAFF_AUTH_ERROR_MATCHER }, { token: DaffAuthGuestOnlyGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable }); }
94
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: GuestOnlyGuard, providedIn: 'any' }); }
95
95
  }
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: GuestOnlyGuard, decorators: [{
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: GuestOnlyGuard, decorators: [{
97
97
  type: Injectable,
98
98
  args: [{
99
99
  providedIn: 'any',
@@ -137,10 +137,10 @@ class DaffAuthResetPasswordGuard {
137
137
  this.facade.dispatch(new DaffResetPasswordLanding(token));
138
138
  return of(true);
139
139
  }
140
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordGuard, deps: [{ token: i1$1.DaffAuthFacade }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
141
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordGuard, providedIn: 'any' }); }
140
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthResetPasswordGuard, deps: [{ token: i1$1.DaffAuthFacade }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
141
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthResetPasswordGuard, providedIn: 'any' }); }
142
142
  }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthResetPasswordGuard, decorators: [{
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthResetPasswordGuard, decorators: [{
144
144
  type: Injectable,
145
145
  args: [{
146
146
  providedIn: 'any',
@@ -173,15 +173,15 @@ class DaffAuthRoutingModule {
173
173
  ],
174
174
  };
175
175
  }
176
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingModule }); }
178
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingModule, providers: [
176
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
177
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingModule }); }
178
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingModule, providers: [
179
179
  DaffAuthResetPasswordGuard,
180
180
  MemberOnlyGuard,
181
181
  GuestOnlyGuard,
182
182
  ] }); }
183
183
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingModule, decorators: [{
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingModule, decorators: [{
185
185
  type: NgModule,
186
186
  args: [{
187
187
  providers: [
@@ -210,10 +210,10 @@ class DaffAuthRedirectEffects {
210
210
  this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.config.redirectUrlParam) || this.config.authCompleteRedirectPath);
211
211
  }), switchMap(() => EMPTY)), { dispatch: false });
212
212
  }
213
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$2.Actions }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
214
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRedirectEffects }); }
213
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$2.Actions }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
214
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRedirectEffects }); }
215
215
  }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
217
217
  type: Injectable
218
218
  }], ctorParameters: () => [{ type: i1$2.Actions }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: undefined, decorators: [{
219
219
  type: Inject,
@@ -221,9 +221,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
221
221
  }] }] });
222
222
 
223
223
  class DaffAuthRoutingRedirectModule {
224
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingRedirectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
225
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1$2.EffectsFeatureModule] }); }
226
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
224
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
225
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1$2.EffectsFeatureModule] }); }
226
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
227
227
  {
228
228
  provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
229
229
  multi: true,
@@ -233,7 +233,7 @@ class DaffAuthRoutingRedirectModule {
233
233
  DaffAuthRedirectEffects,
234
234
  ])] }); }
235
235
  }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
237
237
  type: NgModule,
238
238
  args: [{
239
239
  imports: [