@daffodil/auth 0.66.1 → 0.68.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 (237) hide show
  1. package/{esm2020 → esm2022}/driver/in-memory/backend/auth.service.mjs +4 -4
  2. package/{esm2020 → esm2022}/driver/in-memory/drivers/auth/auth.service.mjs +5 -5
  3. package/{esm2020 → esm2022}/driver/in-memory/drivers/auth-driver.module.mjs +5 -5
  4. package/{esm2020 → esm2022}/driver/in-memory/drivers/login/login.service.mjs +5 -5
  5. package/{esm2020 → esm2022}/driver/in-memory/drivers/register/register.service.mjs +5 -5
  6. package/{esm2020 → esm2022}/driver/in-memory/drivers/reset-password/service.mjs +5 -5
  7. package/{esm2020 → esm2022}/driver/magento/apollo-bearer-token-link-generator.mjs +5 -5
  8. package/{esm2020 → esm2022}/driver/magento/auth-driver.module.mjs +5 -5
  9. package/{esm2020 → esm2022}/driver/magento/auth.service.mjs +5 -5
  10. package/{esm2020 → esm2022}/driver/magento/login.service.mjs +5 -5
  11. package/{esm2020 → esm2022}/driver/magento/register.service.mjs +5 -5
  12. package/{esm2020 → esm2022}/driver/magento/reset-password.service.mjs +5 -5
  13. package/{esm2020 → esm2022}/driver/magento/transforms/auth-transformer.service.mjs +4 -4
  14. package/{esm2020 → esm2022}/driver/services/auth-check.service.mjs +6 -6
  15. package/{esm2020 → esm2022}/driver/testing/drivers/auth/auth.service.mjs +4 -4
  16. package/{esm2020 → esm2022}/driver/testing/drivers/auth-driver.module.mjs +5 -5
  17. package/{esm2020 → esm2022}/driver/testing/drivers/login/login.service.mjs +5 -5
  18. package/{esm2020 → esm2022}/driver/testing/drivers/register/register.service.mjs +5 -5
  19. package/{esm2020 → esm2022}/driver/testing/drivers/reset-password/service.mjs +5 -5
  20. package/{esm2020 → esm2022}/routing/effects/redirect.effects.mjs +6 -6
  21. package/{esm2020 → esm2022}/routing/guards/guest-only.guard.mjs +7 -7
  22. package/{esm2020 → esm2022}/routing/guards/member-only.guard.mjs +7 -7
  23. package/{esm2020 → esm2022}/routing/guards/reset-password.guard.mjs +6 -6
  24. package/{esm2020 → esm2022}/routing/module.mjs +9 -9
  25. package/esm2022/routing/redirect.module.mjs +40 -0
  26. package/esm2022/state/auth-state.module.mjs +88 -0
  27. package/{esm2020 → esm2022}/state/effects/auth.effects.mjs +6 -6
  28. package/{esm2020 → esm2022}/state/effects/login.effects.mjs +6 -6
  29. package/{esm2020 → esm2022}/state/effects/register.effects.mjs +6 -6
  30. package/{esm2020 → esm2022}/state/effects/reset-password.effects.mjs +6 -6
  31. package/{esm2020 → esm2022}/state/facades/auth/facade.mjs +5 -5
  32. package/{esm2020 → esm2022}/state/facades/login/facade.mjs +5 -5
  33. package/{esm2020 → esm2022}/state/facades/register/facade.mjs +5 -5
  34. package/{esm2020 → esm2022}/state/facades/reset-password/facade.mjs +5 -5
  35. package/{esm2020 → esm2022}/state/testing/auth-testing.module.mjs +10 -10
  36. package/{esm2020 → esm2022}/state/testing/mock-auth-facade.mjs +4 -4
  37. package/{esm2020 → esm2022}/state/testing/mock-login-facade.mjs +4 -4
  38. package/{esm2020 → esm2022}/state/testing/mock-register-facade.mjs +4 -4
  39. package/{esm2020 → esm2022}/state/testing/mock-reset-password-facade.mjs +4 -4
  40. package/{esm2020 → esm2022}/storage/auth-storage.service.mjs +6 -6
  41. package/{esm2020 → esm2022}/testing/factories/account-registration.factory.mjs +5 -5
  42. package/{esm2020 → esm2022}/testing/factories/auth-token.factory.mjs +5 -5
  43. package/{esm2020 → esm2022}/testing/factories/reset-password-info.factory.mjs +5 -5
  44. package/{fesm2020 → fesm2022}/daffodil-auth-driver-in-memory.mjs +23 -23
  45. package/{fesm2020 → fesm2022}/daffodil-auth-driver-in-memory.mjs.map +1 -1
  46. package/{fesm2020 → fesm2022}/daffodil-auth-driver-magento.mjs +27 -27
  47. package/{fesm2020 → fesm2022}/daffodil-auth-driver-magento.mjs.map +1 -1
  48. package/{fesm2020 → fesm2022}/daffodil-auth-driver-testing.mjs +19 -19
  49. package/{fesm2020 → fesm2022}/daffodil-auth-driver-testing.mjs.map +1 -1
  50. package/{fesm2020 → fesm2022}/daffodil-auth-driver.mjs +5 -5
  51. package/{fesm2020 → fesm2022}/daffodil-auth-driver.mjs.map +1 -1
  52. package/{fesm2020 → fesm2022}/daffodil-auth-routing.mjs +40 -40
  53. package/fesm2022/daffodil-auth-routing.mjs.map +1 -0
  54. package/fesm2022/daffodil-auth-state-testing.mjs +107 -0
  55. package/{fesm2020 → fesm2022}/daffodil-auth-state-testing.mjs.map +1 -1
  56. package/{fesm2020 → fesm2022}/daffodil-auth-state.mjs +64 -64
  57. package/{fesm2020 → fesm2022}/daffodil-auth-state.mjs.map +1 -1
  58. package/{fesm2020 → fesm2022}/daffodil-auth-testing.mjs +12 -12
  59. package/{fesm2020 → fesm2022}/daffodil-auth-testing.mjs.map +1 -1
  60. package/{fesm2020 → fesm2022}/daffodil-auth.mjs +5 -5
  61. package/{fesm2020 → fesm2022}/daffodil-auth.mjs.map +1 -1
  62. package/package.json +1 -1
  63. package/routing/guards/guest-only.guard.d.ts +2 -2
  64. package/routing/guards/member-only.guard.d.ts +2 -2
  65. package/routing/guards/reset-password.guard.d.ts +2 -2
  66. package/state/actions/auth.actions.d.ts +1 -1
  67. package/state/actions/login.actions.d.ts +1 -1
  68. package/state/actions/register.actions.d.ts +1 -1
  69. package/state/actions/reset-password.actions.d.ts +1 -1
  70. package/state/injection-tokens/unauthenticated/hook.type.d.ts +1 -1
  71. package/state/reducers/login/login-reducer-state.interface.d.ts +1 -1
  72. package/state/reducers/register/register-reducer-state.interface.d.ts +1 -1
  73. package/esm2020/routing/redirect.module.mjs +0 -40
  74. package/esm2020/state/auth-state.module.mjs +0 -88
  75. package/fesm2015/daffodil-auth-driver-in-memory.mjs +0 -256
  76. package/fesm2015/daffodil-auth-driver-in-memory.mjs.map +0 -1
  77. package/fesm2015/daffodil-auth-driver-magento.mjs +0 -372
  78. package/fesm2015/daffodil-auth-driver-magento.mjs.map +0 -1
  79. package/fesm2015/daffodil-auth-driver-testing.mjs +0 -139
  80. package/fesm2015/daffodil-auth-driver-testing.mjs.map +0 -1
  81. package/fesm2015/daffodil-auth-driver.mjs +0 -119
  82. package/fesm2015/daffodil-auth-driver.mjs.map +0 -1
  83. package/fesm2015/daffodil-auth-routing.mjs +0 -262
  84. package/fesm2015/daffodil-auth-routing.mjs.map +0 -1
  85. package/fesm2015/daffodil-auth-state-testing.mjs +0 -107
  86. package/fesm2015/daffodil-auth-state-testing.mjs.map +0 -1
  87. package/fesm2015/daffodil-auth-state.mjs +0 -853
  88. package/fesm2015/daffodil-auth-state.mjs.map +0 -1
  89. package/fesm2015/daffodil-auth-testing.mjs +0 -77
  90. package/fesm2015/daffodil-auth-testing.mjs.map +0 -1
  91. package/fesm2015/daffodil-auth.mjs +0 -63
  92. package/fesm2015/daffodil-auth.mjs.map +0 -1
  93. package/fesm2020/daffodil-auth-routing.mjs.map +0 -1
  94. package/fesm2020/daffodil-auth-state-testing.mjs +0 -107
  95. /package/{esm2020 → esm2022}/daffodil-auth.mjs +0 -0
  96. /package/{esm2020 → esm2022}/driver/constants/public_api.mjs +0 -0
  97. /package/{esm2020 → esm2022}/driver/constants/unauthenticated-error-codes.mjs +0 -0
  98. /package/{esm2020 → esm2022}/driver/daffodil-auth-driver.mjs +0 -0
  99. /package/{esm2020 → esm2022}/driver/errors/authentication-failed.mjs +0 -0
  100. /package/{esm2020 → esm2022}/driver/errors/codes.enum.mjs +0 -0
  101. /package/{esm2020 → esm2022}/driver/errors/invalid-api-response.mjs +0 -0
  102. /package/{esm2020 → esm2022}/driver/errors/map.mjs +0 -0
  103. /package/{esm2020 → esm2022}/driver/errors/public_api.mjs +0 -0
  104. /package/{esm2020 → esm2022}/driver/errors/registration-failed.mjs +0 -0
  105. /package/{esm2020 → esm2022}/driver/errors/unauthorized.mjs +0 -0
  106. /package/{esm2020 → esm2022}/driver/in-memory/daffodil-auth-driver-in-memory.mjs +0 -0
  107. /package/{esm2020 → esm2022}/driver/in-memory/drivers/public_api.mjs +0 -0
  108. /package/{esm2020 → esm2022}/driver/in-memory/index.mjs +0 -0
  109. /package/{esm2020 → esm2022}/driver/in-memory/models/db-customer.type.mjs +0 -0
  110. /package/{esm2020 → esm2022}/driver/in-memory/public_api.mjs +0 -0
  111. /package/{esm2020 → esm2022}/driver/index.mjs +0 -0
  112. /package/{esm2020 → esm2022}/driver/interfaces/auth-service.interface.mjs +0 -0
  113. /package/{esm2020 → esm2022}/driver/interfaces/login-service.interface.mjs +0 -0
  114. /package/{esm2020 → esm2022}/driver/interfaces/public_api.mjs +0 -0
  115. /package/{esm2020 → esm2022}/driver/interfaces/register-service.interface.mjs +0 -0
  116. /package/{esm2020 → esm2022}/driver/interfaces/reset-password-service.interface.mjs +0 -0
  117. /package/{esm2020 → esm2022}/driver/magento/daffodil-auth-driver-magento.mjs +0 -0
  118. /package/{esm2020 → esm2022}/driver/magento/errors/codes.mjs +0 -0
  119. /package/{esm2020 → esm2022}/driver/magento/errors/map.mjs +0 -0
  120. /package/{esm2020 → esm2022}/driver/magento/errors/transform.mjs +0 -0
  121. /package/{esm2020 → esm2022}/driver/magento/index.mjs +0 -0
  122. /package/{esm2020 → esm2022}/driver/magento/models/public_api.mjs +0 -0
  123. /package/{esm2020 → esm2022}/driver/magento/models/response/auth.mjs +0 -0
  124. /package/{esm2020 → esm2022}/driver/magento/models/response/register.type.mjs +0 -0
  125. /package/{esm2020 → esm2022}/driver/magento/models/response/reset-password.type.mjs +0 -0
  126. /package/{esm2020 → esm2022}/driver/magento/models/response/send-reset-email.type.mjs +0 -0
  127. /package/{esm2020 → esm2022}/driver/magento/public_api.mjs +0 -0
  128. /package/{esm2020 → esm2022}/driver/magento/queries/check-token.mjs +0 -0
  129. /package/{esm2020 → esm2022}/driver/magento/queries/create-customer.mjs +0 -0
  130. /package/{esm2020 → esm2022}/driver/magento/queries/generate-token.mjs +0 -0
  131. /package/{esm2020 → esm2022}/driver/magento/queries/public_api.mjs +0 -0
  132. /package/{esm2020 → esm2022}/driver/magento/queries/reset-password.mjs +0 -0
  133. /package/{esm2020 → esm2022}/driver/magento/queries/responses/check-token-response.mjs +0 -0
  134. /package/{esm2020 → esm2022}/driver/magento/queries/responses/generate-token-response.mjs +0 -0
  135. /package/{esm2020 → esm2022}/driver/magento/queries/responses/public_api.mjs +0 -0
  136. /package/{esm2020 → esm2022}/driver/magento/queries/responses/revoke-customer-token-response.mjs +0 -0
  137. /package/{esm2020 → esm2022}/driver/magento/queries/revoke-customer-token.mjs +0 -0
  138. /package/{esm2020 → esm2022}/driver/magento/queries/send-reset-email.mjs +0 -0
  139. /package/{esm2020 → esm2022}/driver/magento/validators/check-token.mjs +0 -0
  140. /package/{esm2020 → esm2022}/driver/magento/validators/generate-token.mjs +0 -0
  141. /package/{esm2020 → esm2022}/driver/magento/validators/public_api.mjs +0 -0
  142. /package/{esm2020 → esm2022}/driver/magento/validators/reset-password.mjs +0 -0
  143. /package/{esm2020 → esm2022}/driver/magento/validators/revoke-token.mjs +0 -0
  144. /package/{esm2020 → esm2022}/driver/magento/validators/send-reset-email.mjs +0 -0
  145. /package/{esm2020 → esm2022}/driver/public_api.mjs +0 -0
  146. /package/{esm2020 → esm2022}/driver/services/public_api.mjs +0 -0
  147. /package/{esm2020 → esm2022}/driver/testing/daffodil-auth-driver-testing.mjs +0 -0
  148. /package/{esm2020 → esm2022}/driver/testing/drivers/public_api.mjs +0 -0
  149. /package/{esm2020 → esm2022}/driver/testing/index.mjs +0 -0
  150. /package/{esm2020 → esm2022}/driver/testing/public_api.mjs +0 -0
  151. /package/{esm2020 → esm2022}/errors/codes.enum.mjs +0 -0
  152. /package/{esm2020 → esm2022}/errors/map.mjs +0 -0
  153. /package/{esm2020 → esm2022}/errors/missing-token.mjs +0 -0
  154. /package/{esm2020 → esm2022}/errors/public_api.mjs +0 -0
  155. /package/{esm2020 → esm2022}/index.mjs +0 -0
  156. /package/{esm2020 → esm2022}/models/account-registration.mjs +0 -0
  157. /package/{esm2020 → esm2022}/models/auth-token.mjs +0 -0
  158. /package/{esm2020 → esm2022}/models/login-info.mjs +0 -0
  159. /package/{esm2020 → esm2022}/models/public_api.mjs +0 -0
  160. /package/{esm2020 → esm2022}/models/reset-password-info.type.mjs +0 -0
  161. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  162. /package/{esm2020 → esm2022}/routing/config/default.mjs +0 -0
  163. /package/{esm2020 → esm2022}/routing/config/interface.mjs +0 -0
  164. /package/{esm2020 → esm2022}/routing/config/public_api.mjs +0 -0
  165. /package/{esm2020 → esm2022}/routing/config/token.mjs +0 -0
  166. /package/{esm2020 → esm2022}/routing/daffodil-auth-routing.mjs +0 -0
  167. /package/{esm2020 → esm2022}/routing/guards/guest-only-guard-redirect.token.mjs +0 -0
  168. /package/{esm2020 → esm2022}/routing/guards/member-only-guard-redirect.token.mjs +0 -0
  169. /package/{esm2020 → esm2022}/routing/guards/public_api.mjs +0 -0
  170. /package/{esm2020 → esm2022}/routing/helpers/public_api.mjs +0 -0
  171. /package/{esm2020 → esm2022}/routing/helpers/redirect-unauthenticated-hook-factory.mjs +0 -0
  172. /package/{esm2020 → esm2022}/routing/index.mjs +0 -0
  173. /package/{esm2020 → esm2022}/routing/public_api.mjs +0 -0
  174. /package/{esm2020 → esm2022}/state/actions/auth.actions.mjs +0 -0
  175. /package/{esm2020 → esm2022}/state/actions/login.actions.mjs +0 -0
  176. /package/{esm2020 → esm2022}/state/actions/public_api.mjs +0 -0
  177. /package/{esm2020 → esm2022}/state/actions/register.actions.mjs +0 -0
  178. /package/{esm2020 → esm2022}/state/actions/reset-password.actions.mjs +0 -0
  179. /package/{esm2020 → esm2022}/state/config/default.mjs +0 -0
  180. /package/{esm2020 → esm2022}/state/config/public_api.mjs +0 -0
  181. /package/{esm2020 → esm2022}/state/config/token.mjs +0 -0
  182. /package/{esm2020 → esm2022}/state/config/type.mjs +0 -0
  183. /package/{esm2020 → esm2022}/state/daffodil-auth-state.mjs +0 -0
  184. /package/{esm2020 → esm2022}/state/facades/auth/facade.interface.mjs +0 -0
  185. /package/{esm2020 → esm2022}/state/facades/auth/public_api.mjs +0 -0
  186. /package/{esm2020 → esm2022}/state/facades/login/facade.interface.mjs +0 -0
  187. /package/{esm2020 → esm2022}/state/facades/login/public_api.mjs +0 -0
  188. /package/{esm2020 → esm2022}/state/facades/public_api.mjs +0 -0
  189. /package/{esm2020 → esm2022}/state/facades/register/facade.interface.mjs +0 -0
  190. /package/{esm2020 → esm2022}/state/facades/register/public_api.mjs +0 -0
  191. /package/{esm2020 → esm2022}/state/facades/reset-password/facade.interface.mjs +0 -0
  192. /package/{esm2020 → esm2022}/state/facades/reset-password/public_api.mjs +0 -0
  193. /package/{esm2020 → esm2022}/state/index.mjs +0 -0
  194. /package/{esm2020 → esm2022}/state/injection-tokens/error-matcher.token.mjs +0 -0
  195. /package/{esm2020 → esm2022}/state/injection-tokens/public_api.mjs +0 -0
  196. /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hook.token.mjs +0 -0
  197. /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hook.type.mjs +0 -0
  198. /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/hooks.token.mjs +0 -0
  199. /package/{esm2020 → esm2022}/state/injection-tokens/unauthenticated/public_api.mjs +0 -0
  200. /package/{esm2020 → esm2022}/state/public_api.mjs +0 -0
  201. /package/{esm2020 → esm2022}/state/reducers/auth/auth-initial-state.mjs +0 -0
  202. /package/{esm2020 → esm2022}/state/reducers/auth/auth-reducer-state.interface.mjs +0 -0
  203. /package/{esm2020 → esm2022}/state/reducers/auth/auth.reducer.mjs +0 -0
  204. /package/{esm2020 → esm2022}/state/reducers/auth/public_api.mjs +0 -0
  205. /package/{esm2020 → esm2022}/state/reducers/auth-feature-state.interface.mjs +0 -0
  206. /package/{esm2020 → esm2022}/state/reducers/auth-reducers.mjs +0 -0
  207. /package/{esm2020 → esm2022}/state/reducers/auth-store-feature-key.mjs +0 -0
  208. /package/{esm2020 → esm2022}/state/reducers/login/login-initial-state.mjs +0 -0
  209. /package/{esm2020 → esm2022}/state/reducers/login/login-reducer-state.interface.mjs +0 -0
  210. /package/{esm2020 → esm2022}/state/reducers/login/login.reducer.mjs +0 -0
  211. /package/{esm2020 → esm2022}/state/reducers/login/public_api.mjs +0 -0
  212. /package/{esm2020 → esm2022}/state/reducers/public_api.mjs +0 -0
  213. /package/{esm2020 → esm2022}/state/reducers/register/public_api.mjs +0 -0
  214. /package/{esm2020 → esm2022}/state/reducers/register/register-initial-state.mjs +0 -0
  215. /package/{esm2020 → esm2022}/state/reducers/register/register-reducer-state.interface.mjs +0 -0
  216. /package/{esm2020 → esm2022}/state/reducers/register/register.reducer.mjs +0 -0
  217. /package/{esm2020 → esm2022}/state/reducers/reset-password/initial-state.mjs +0 -0
  218. /package/{esm2020 → esm2022}/state/reducers/reset-password/public_api.mjs +0 -0
  219. /package/{esm2020 → esm2022}/state/reducers/reset-password/reducer.mjs +0 -0
  220. /package/{esm2020 → esm2022}/state/reducers/reset-password/state.interface.mjs +0 -0
  221. /package/{esm2020 → esm2022}/state/reducers/token/extra.token.mjs +0 -0
  222. /package/{esm2020 → esm2022}/state/reducers/token/public_api.mjs +0 -0
  223. /package/{esm2020 → esm2022}/state/reducers/token/reducers.token.mjs +0 -0
  224. /package/{esm2020 → esm2022}/state/selectors/auth/auth.selector.mjs +0 -0
  225. /package/{esm2020 → esm2022}/state/selectors/auth-all.selector.mjs +0 -0
  226. /package/{esm2020 → esm2022}/state/selectors/auth-feature.selector.mjs +0 -0
  227. /package/{esm2020 → esm2022}/state/selectors/login/login.selector.mjs +0 -0
  228. /package/{esm2020 → esm2022}/state/selectors/public_api.mjs +0 -0
  229. /package/{esm2020 → esm2022}/state/selectors/register/register.selector.mjs +0 -0
  230. /package/{esm2020 → esm2022}/state/selectors/reset-password/selector.mjs +0 -0
  231. /package/{esm2020 → esm2022}/state/testing/daffodil-auth-state-testing.mjs +0 -0
  232. /package/{esm2020 → esm2022}/state/testing/index.mjs +0 -0
  233. /package/{esm2020 → esm2022}/state/testing/public_api.mjs +0 -0
  234. /package/{esm2020 → esm2022}/testing/daffodil-auth-testing.mjs +0 -0
  235. /package/{esm2020 → esm2022}/testing/factories/public_api.mjs +0 -0
  236. /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
  237. /package/{esm2020 → esm2022}/testing/public_api.mjs +0 -0
@@ -53,4 +53,4 @@ export declare class DaffAuthCheckFailure implements Action {
53
53
  readonly type = DaffAuthActionTypes.AuthCheckFailureAction;
54
54
  constructor(errorMessage: DaffStateError);
55
55
  }
56
- export declare type DaffAuthActions = DaffAuthResetToUnauthenticated | DaffAuthStorageFailure | DaffAuthGuardLogout | DaffAuthServerSide | DaffAuthCheck | DaffAuthCheckSuccess | DaffAuthCheckFailure;
56
+ export type DaffAuthActions = DaffAuthResetToUnauthenticated | DaffAuthStorageFailure | DaffAuthGuardLogout | DaffAuthServerSide | DaffAuthCheck | DaffAuthCheckSuccess | DaffAuthCheckFailure;
@@ -61,4 +61,4 @@ export declare class DaffAuthLogoutFailure implements Action {
61
61
  readonly type = DaffAuthLoginActionTypes.LogoutFailureAction;
62
62
  constructor(errorMessage: DaffStateError);
63
63
  }
64
- export declare type DaffAuthLoginActions<T extends DaffLoginInfo = DaffLoginInfo, U extends DaffAuthToken = DaffAuthToken> = DaffAuthLogin<T> | DaffAuthLoginSuccess<U> | DaffAuthLoginFailure | DaffAuthLogout | DaffAuthLogoutSuccess | DaffAuthLogoutFailure;
64
+ export type DaffAuthLoginActions<T extends DaffLoginInfo = DaffLoginInfo, U extends DaffAuthToken = DaffAuthToken> = DaffAuthLogin<T> | DaffAuthLoginSuccess<U> | DaffAuthLoginFailure | DaffAuthLogout | DaffAuthLogoutSuccess | DaffAuthLogoutFailure;
@@ -37,4 +37,4 @@ export declare class DaffAuthRegisterFailure implements Action {
37
37
  readonly type = DaffAuthRegisterActionTypes.RegisterFailureAction;
38
38
  constructor(errorMessage: DaffStateError);
39
39
  }
40
- export declare type DaffAuthRegisterActions<T extends DaffAccountRegistration = DaffAccountRegistration> = DaffAuthRegister<T> | DaffAuthRegisterSuccess | DaffAuthRegisterFailure;
40
+ export type DaffAuthRegisterActions<T extends DaffAccountRegistration = DaffAccountRegistration> = DaffAuthRegister<T> | DaffAuthRegisterSuccess | DaffAuthRegisterFailure;
@@ -71,4 +71,4 @@ export declare class DaffResetPasswordLanding implements Action {
71
71
  readonly type = DaffAuthResetPasswordActionTypes.ResetPasswordLandingAction;
72
72
  constructor(token: DaffAuthResetPasswordInfo['token']);
73
73
  }
74
- export declare type DaffAuthResetPasswordActions<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> = DaffSendResetEmail | DaffSendResetEmailSuccess | DaffSendResetEmailFailure | DaffResetPassword<T> | DaffResetPasswordSuccess | DaffResetPasswordFailure | DaffResetPasswordLanding;
74
+ export type DaffAuthResetPasswordActions<T extends DaffAuthResetPasswordInfo = DaffAuthResetPasswordInfo> = DaffSendResetEmail | DaffSendResetEmailSuccess | DaffSendResetEmailFailure | DaffResetPassword<T> | DaffResetPasswordSuccess | DaffResetPasswordFailure | DaffResetPasswordLanding;
@@ -6,4 +6,4 @@ import { Observable } from 'rxjs';
6
6
  * These hooks will be called in no particular order before the client driver state is reset.
7
7
  * Daffodil will wait for at least one emission from each hook before proceeding.
8
8
  */
9
- export declare type DaffAuthUnauthenticatedHook = (trigger: Action['type']) => Observable<unknown>;
9
+ export type DaffAuthUnauthenticatedHook = (trigger: Action['type']) => Observable<unknown>;
@@ -1,2 +1,2 @@
1
1
  import { DaffOperationState } from '@daffodil/core/state';
2
- export declare type DaffAuthLoginReducerState = DaffOperationState;
2
+ export type DaffAuthLoginReducerState = DaffOperationState;
@@ -1,2 +1,2 @@
1
1
  import { DaffOperationState } from '@daffodil/core/state';
2
- export declare type DaffAuthRegisterReducerState = DaffOperationState;
2
+ export type DaffAuthRegisterReducerState = DaffOperationState;
@@ -1,40 +0,0 @@
1
- import { NgModule, inject, } from '@angular/core';
2
- import { ActivatedRoute, Router, } from '@angular/router';
3
- import { EffectsModule } from '@ngrx/effects';
4
- import { DAFF_AUTH_UNAUTHENTICATED_HOOKS, } from '@daffodil/auth/state';
5
- import { DAFF_AUTH_ROUTING_CONFIG } from './config/public_api';
6
- import { DaffAuthRedirectEffects } from './effects/redirect.effects';
7
- import { daffAuthRoutingRedirectUnauthenticatedHookFactory } from './helpers/public_api';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@ngrx/effects";
10
- export class DaffAuthRoutingRedirectModule {
11
- }
12
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1.EffectsFeatureModule] });
14
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
15
- {
16
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
17
- multi: true,
18
- useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
19
- },
20
- ], imports: [EffectsModule.forFeature([
21
- DaffAuthRedirectEffects,
22
- ])] });
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
24
- type: NgModule,
25
- args: [{
26
- imports: [
27
- EffectsModule.forFeature([
28
- DaffAuthRedirectEffects,
29
- ]),
30
- ],
31
- providers: [
32
- {
33
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
34
- multi: true,
35
- useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
36
- },
37
- ],
38
- }]
39
- }] });
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkaXJlY3QubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGlicy9hdXRoL3JvdXRpbmcvc3JjL3JlZGlyZWN0Lm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsUUFBUSxFQUNSLE1BQU0sR0FDUCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQ0wsY0FBYyxFQUNkLE1BQU0sR0FDUCxNQUFNLGlCQUFpQixDQUFDO0FBQ3pCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNOUMsT0FBTyxFQUNMLCtCQUErQixHQUloQyxNQUFNLHNCQUFzQixDQUFDO0FBRTlCLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQy9ELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ3JFLE9BQU8sRUFBRSxpREFBaUQsRUFBRSxNQUFNLHNCQUFzQixDQUFDOzs7QUFzQnpGLE1BQU0sT0FBTyw2QkFBNkI7OzZJQUE3Qiw2QkFBNkI7OElBQTdCLDZCQUE2Qjs4SUFBN0IsNkJBQTZCLGFBYjdCO1FBQ1Q7WUFDRSxPQUFPLEVBQUUsK0JBQStCO1lBQ3hDLEtBQUssRUFBRSxJQUFJO1lBQ1gsVUFBVSxHQUFFLEdBQUcsRUFBRSxDQUNmLGlEQUFpRCxDQUMvQyxNQUFNLENBQUMsTUFBTSxDQUFDLEV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WZmQXV0aFVuYXV0aGVudGljYXRlZEhvb2ssXG59IGZyb20gJ0BkYWZmb2RpbC9hdXRoL3N0YXRlJztcblxuaW1wb3J0IHsgREFGRl9BVVRIX1JPVVRJTkdfQ09ORklHIH0gZnJvbSAnLi9jb25maWcvcHVibGljX2FwaSc7XG5pbXBvcnQgeyBEYWZmQXV0aFJlZGlyZWN0RWZmZWN0cyB9IGZyb20gJy4vZWZmZWN0cy9yZWRpcmVjdC5lZmZlY3RzJztcbmltcG9ydCB7IGRhZmZBdXRoUm91dGluZ1JlZGlyZWN0VW5hdXRoZW50aWNhdGVkSG9va0ZhY3RvcnkgfSBmcm9tICcuL2hlbHBlcnMvcHVibGljX2FwaSc7XG5cblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW1xuICAgIEVmZmVjdHNNb2R1bGUuZm9yRmVhdHVyZShbXG4gICAgICBEYWZmQXV0aFJlZGlyZWN0RWZmZWN0cyxcbiAgICBdKSxcbiAgXSxcbiAgcHJvdmlkZXJzOiBbXG4gICAge1xuICAgICAgcHJvdmlkZTogREFGRl9BVVRIX1VOQVVUSEVOVElDQVRFRF9IT09LUyxcbiAgICAgIG11bHRpOiB0cnVlLFxuICAgICAgdXNlRmFjdG9yeTogKCkgPT5cbiAgICAgICAgZGFmZkF1dGhSb3V0aW5nUmVkaXJlY3RVbmF1dGhlbnRpY2F0ZWRIb29rRmFjdG9yeShcbiAgICAgICAgICBpbmplY3QoUm91dGVyKSxcbiAgICAgICAgICBpbmplY3QoQWN0aXZhdGVkUm91dGUpLFxuICAgICAgICAgIGluamVjdChEQUZGX0FVVEhfUk9VVElOR19DT05GSUcpLFxuICAgICAgICApLFxuICAgIH0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZBdXRoUm91dGluZ1JlZGlyZWN0TW9kdWxlIHt9XG4iXX0=
@@ -1,88 +0,0 @@
1
- import { NgModule, inject, } from '@angular/core';
2
- import { EffectsModule } from '@ngrx/effects';
3
- import { StoreModule } from '@ngrx/store';
4
- import { of } from 'rxjs';
5
- import { DaffAuthStorageService } from '@daffodil/auth';
6
- import { daffAuthStateDefaultConfig, provideDaffAuthStateConfig, } from './config/public_api';
7
- import { DaffAuthEffects } from './effects/auth.effects';
8
- import { DaffAuthLoginEffects } from './effects/login.effects';
9
- import { DaffAuthRegisterEffects } from './effects/register.effects';
10
- import { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';
11
- import { DAFF_AUTH_UNAUTHENTICATED_HOOKS, } from './injection-tokens/public_api';
12
- import { DAFF_AUTH_STORE_FEATURE_KEY } from './reducers/public_api';
13
- import { DAFF_AUTH_REDUCERS } from './reducers/token/reducers.token';
14
- import * as i0 from "@angular/core";
15
- import * as i1 from "@ngrx/store";
16
- import * as i2 from "@ngrx/effects";
17
- export class DaffAuthStateModule {
18
- static withConfig(config = {}) {
19
- return {
20
- ngModule: DaffAuthStateModule,
21
- providers: [
22
- provideDaffAuthStateConfig({
23
- ...daffAuthStateDefaultConfig,
24
- ...config,
25
- }),
26
- ],
27
- };
28
- }
29
- }
30
- /** @nocollapse */ DaffAuthStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31
- /** @nocollapse */ DaffAuthStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateModule, imports: [i1.StoreFeatureModule, i2.EffectsFeatureModule] });
32
- /** @nocollapse */ DaffAuthStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateModule, providers: [
33
- {
34
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
35
- useFactory: (() => {
36
- const storage = inject(DaffAuthStorageService);
37
- const hook = (() => {
38
- try {
39
- return of(storage.removeAuthToken());
40
- }
41
- catch {
42
- return of(null);
43
- }
44
- });
45
- return hook;
46
- }),
47
- multi: true,
48
- },
49
- ], imports: [StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_REDUCERS),
50
- EffectsModule.forFeature([
51
- DaffAuthEffects,
52
- DaffAuthLoginEffects,
53
- DaffAuthRegisterEffects,
54
- DaffAuthResetPasswordEffects,
55
- ])] });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateModule, decorators: [{
57
- type: NgModule,
58
- args: [{
59
- imports: [
60
- StoreModule.forFeature(DAFF_AUTH_STORE_FEATURE_KEY, DAFF_AUTH_REDUCERS),
61
- EffectsModule.forFeature([
62
- DaffAuthEffects,
63
- DaffAuthLoginEffects,
64
- DaffAuthRegisterEffects,
65
- DaffAuthResetPasswordEffects,
66
- ]),
67
- ],
68
- providers: [
69
- {
70
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
71
- useFactory: (() => {
72
- const storage = inject(DaffAuthStorageService);
73
- const hook = (() => {
74
- try {
75
- return of(storage.removeAuthToken());
76
- }
77
- catch {
78
- return of(null);
79
- }
80
- });
81
- return hook;
82
- }),
83
- multi: true,
84
- },
85
- ],
86
- }]
87
- }] });
88
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1zdGF0ZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2F1dGgvc3RhdGUvc3JjL2F1dGgtc3RhdGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxRQUFRLEVBQ1IsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDOUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGFBQWEsQ0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2VTZXJ2aWNlKTtcbiAgICAgICAgY29uc3QgaG9vazogRGFmZkF1dGhVbmF1dGhlbnRpY2F0ZWRIb29rID0gKCkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gb2Yoc3RvcmFnZS5yZW1vdmVBdXRoVG9rZW4oKSk7XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgICByZXR1cm4gb2YobnVsbCk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBob29rO1xuICAgICAgfSxcbiAgICAgIG11bHRpOiB0cnVlLFxuICAgIH0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZBdXRoU3RhdGVNb2R1bGUge1xuICBzdGF0aWMgd2l0aENvbmZpZyhjb25maWc6IFBhcnRpYWw8RGFmZkF1dGhTdGF0ZUNvbmZpZz4gPSB7fSk6IE1vZHVsZVdpdGhQcm92aWRlcnM8RGFmZkF1dGhTdGF0ZU1vZHVsZT4ge1xuICAgIHJldHVybiB7XG4gICAgICBuZ01vZHVsZTogRGFmZkF1dGhTdGF0ZU1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICBwcm92aWRlRGFmZkF1dGhTdGF0ZUNvbmZpZyh7XG4gICAgICAgICAgLi4uZGFmZkF1dGhTdGF0ZURlZmF1bHRDb25maWcsXG4gICAgICAgICAgLi4uY29uZmlnLFxuICAgICAgICB9KSxcbiAgICAgIF0sXG4gICAgfTtcbiAgfVxufVxuIl19
@@ -1,256 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Injectable, NgModule } from '@angular/core';
4
- import { DaffLoginDriver, DaffRegisterDriver, DaffAuthDriver, DaffResetPasswordDriver } from '@daffodil/auth/driver';
5
- import { map, switchMap } from 'rxjs/operators';
6
- import * as i1 from '@angular/common/http';
7
- import { of, throwError } from 'rxjs';
8
- import { faker } from '@faker-js/faker/locale/en_US';
9
- import { STATUS } from 'angular-in-memory-web-api';
10
-
11
- /**
12
- * @inheritdoc
13
- */
14
- class DaffInMemoryAuthService {
15
- constructor(http) {
16
- this.http = http;
17
- this.url = '/api/auth/';
18
- }
19
- check() {
20
- return this.http.post(`${this.url}check`, {}).pipe(map(() => undefined));
21
- }
22
- }
23
- /** @nocollapse */ DaffInMemoryAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryAuthService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
24
- /** @nocollapse */ DaffInMemoryAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryAuthService, providedIn: 'root' });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryAuthService, decorators: [{
26
- type: Injectable,
27
- args: [{
28
- providedIn: 'root',
29
- }]
30
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
31
-
32
- /**
33
- * @inheritdoc
34
- */
35
- class DaffInMemoryLoginService {
36
- constructor(http) {
37
- this.http = http;
38
- this.url = '/api/auth/';
39
- }
40
- login(request) {
41
- return this.http.post(`${this.url}login`, request);
42
- }
43
- logout() {
44
- return this.http.post(`${this.url}logout`, {}).pipe(switchMap(({ success }) => success ? of(undefined) : throwError(() => new Error('Logout failed'))));
45
- }
46
- }
47
- /** @nocollapse */ DaffInMemoryLoginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryLoginService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
48
- /** @nocollapse */ DaffInMemoryLoginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryLoginService, providedIn: 'root' });
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryLoginService, decorators: [{
50
- type: Injectable,
51
- args: [{
52
- providedIn: 'root',
53
- }]
54
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
55
-
56
- /**
57
- * @inheritdoc
58
- */
59
- class DaffInMemoryRegisterService {
60
- constructor(http, loginService) {
61
- this.http = http;
62
- this.loginService = loginService;
63
- this.url = '/api/auth/';
64
- }
65
- register(registration) {
66
- return this.registerOnly(registration).pipe(switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })), map(({ token }) => token));
67
- }
68
- registerOnly(registration) {
69
- return this.http.post(`${this.url}register`, registration);
70
- }
71
- }
72
- /** @nocollapse */ DaffInMemoryRegisterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryRegisterService, deps: [{ token: i1.HttpClient }, { token: DaffInMemoryLoginService }], target: i0.ɵɵFactoryTarget.Injectable });
73
- /** @nocollapse */ DaffInMemoryRegisterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryRegisterService, providedIn: 'root' });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryRegisterService, decorators: [{
75
- type: Injectable,
76
- args: [{
77
- providedIn: 'root',
78
- }]
79
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: DaffInMemoryLoginService }]; } });
80
-
81
- /**
82
- * @inheritdoc
83
- */
84
- class DaffInMemoryResetPasswordService {
85
- constructor(http, loginService) {
86
- this.http = http;
87
- this.loginService = loginService;
88
- this.url = '/api/auth/';
89
- }
90
- resetPassword(info) {
91
- return this.resetPasswordOnly(info).pipe(switchMap(() => this.loginService.login({ email: info.email, password: info.password })), map(({ token }) => token));
92
- }
93
- resetPasswordOnly(info) {
94
- return this.http.post(`${this.url}resetPassword`, info);
95
- }
96
- sendResetEmail(email) {
97
- return this.http.post(`${this.url}sendResetEmail`, { email });
98
- }
99
- }
100
- /** @nocollapse */ DaffInMemoryResetPasswordService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryResetPasswordService, deps: [{ token: i1.HttpClient }, { token: DaffInMemoryLoginService }], target: i0.ɵɵFactoryTarget.Injectable });
101
- /** @nocollapse */ DaffInMemoryResetPasswordService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryResetPasswordService, providedIn: 'root' });
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryResetPasswordService, decorators: [{
103
- type: Injectable,
104
- args: [{
105
- providedIn: 'root',
106
- }]
107
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: DaffInMemoryLoginService }]; } });
108
-
109
- class DaffAuthInMemoryDriverModule {
110
- static forRoot() {
111
- return {
112
- ngModule: DaffAuthInMemoryDriverModule,
113
- providers: [
114
- {
115
- provide: DaffLoginDriver,
116
- useExisting: DaffInMemoryLoginService,
117
- },
118
- {
119
- provide: DaffRegisterDriver,
120
- useExisting: DaffInMemoryRegisterService,
121
- },
122
- {
123
- provide: DaffAuthDriver,
124
- useExisting: DaffInMemoryAuthService,
125
- },
126
- {
127
- provide: DaffResetPasswordDriver,
128
- useExisting: DaffInMemoryResetPasswordService,
129
- },
130
- ],
131
- };
132
- }
133
- }
134
- /** @nocollapse */ DaffAuthInMemoryDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
135
- /** @nocollapse */ DaffAuthInMemoryDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthInMemoryDriverModule, imports: [CommonModule] });
136
- /** @nocollapse */ DaffAuthInMemoryDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthInMemoryDriverModule, imports: [CommonModule] });
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthInMemoryDriverModule, decorators: [{
138
- type: NgModule,
139
- args: [{
140
- imports: [
141
- CommonModule,
142
- ],
143
- }]
144
- }] });
145
-
146
- /**
147
- * @inheritdoc
148
- */
149
- class DaffInMemoryBackendAuthService {
150
- constructor() {
151
- this.customers = {};
152
- }
153
- generateToken() {
154
- return faker.random.alphaNumeric(16);
155
- }
156
- createDb() {
157
- return {
158
- auth: this.customers,
159
- };
160
- }
161
- post(reqInfo) {
162
- if (reqInfo.id === 'login') {
163
- return this.login(reqInfo);
164
- }
165
- else if (reqInfo.id === 'register') {
166
- return this.register(reqInfo);
167
- }
168
- else if (reqInfo.id === 'logout') {
169
- return this.logout(reqInfo);
170
- }
171
- else if (reqInfo.id === 'check') {
172
- return this.check(reqInfo);
173
- }
174
- else if (reqInfo.id === 'resetPassword') {
175
- return this.resetPassword(reqInfo);
176
- }
177
- else if (reqInfo.id === 'sendResetEmail') {
178
- return this.sendResetEmail(reqInfo);
179
- }
180
- }
181
- login(reqInfo) {
182
- const { email, password, } = reqInfo.utils.getJsonBody(reqInfo.req);
183
- const customer = this.customers[email];
184
- if (password && (customer === null || customer === void 0 ? void 0 : customer.password) === password) {
185
- this.customers[email].token = this.generateToken();
186
- return reqInfo.utils.createResponse$(() => ({
187
- body: {
188
- token: customer.token,
189
- },
190
- status: STATUS.OK,
191
- }));
192
- }
193
- return reqInfo.utils.createResponse$(() => ({
194
- status: STATUS.UNAUTHORIZED,
195
- }));
196
- }
197
- register(reqInfo) {
198
- const { email, password, } = reqInfo.utils.getJsonBody(reqInfo.req);
199
- this.customers[email] = {
200
- email,
201
- password,
202
- };
203
- return reqInfo.utils.createResponse$(() => ({
204
- status: STATUS.CREATED,
205
- }));
206
- }
207
- logout(reqInfo) {
208
- const { email, } = reqInfo.utils.getJsonBody(reqInfo.req);
209
- if (this.customers[email]) {
210
- this.customers[email].token = null;
211
- }
212
- return reqInfo.utils.createResponse$(() => ({
213
- body: { success: true },
214
- status: STATUS.OK,
215
- }));
216
- }
217
- check(reqInfo) {
218
- return reqInfo.utils.createResponse$(() => ({
219
- body: {},
220
- status: STATUS.OK,
221
- }));
222
- }
223
- resetPassword(reqInfo) {
224
- const { email, password, } = reqInfo.utils.getJsonBody(reqInfo.req);
225
- if (this.customers[email]) {
226
- this.customers[email].password = password;
227
- return reqInfo.utils.createResponse$(() => ({
228
- status: STATUS.OK,
229
- }));
230
- }
231
- return reqInfo.utils.createResponse$(() => ({
232
- status: STATUS.UNAUTHORIZED,
233
- }));
234
- }
235
- sendResetEmail(reqInfo) {
236
- return reqInfo.utils.createResponse$(() => ({
237
- body: {},
238
- status: STATUS.OK,
239
- }));
240
- }
241
- }
242
- /** @nocollapse */ DaffInMemoryBackendAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryBackendAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
243
- /** @nocollapse */ DaffInMemoryBackendAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryBackendAuthService, providedIn: 'root' });
244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffInMemoryBackendAuthService, decorators: [{
245
- type: Injectable,
246
- args: [{
247
- providedIn: 'root',
248
- }]
249
- }] });
250
-
251
- /**
252
- * Generated bundle index. Do not edit.
253
- */
254
-
255
- export { DaffAuthInMemoryDriverModule, DaffInMemoryAuthService, DaffInMemoryBackendAuthService, DaffInMemoryLoginService, DaffInMemoryRegisterService };
256
- //# sourceMappingURL=daffodil-auth-driver-in-memory.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daffodil-auth-driver-in-memory.mjs","sources":["../../../libs/auth/driver/in-memory/src/drivers/auth/auth.service.ts","../../../libs/auth/driver/in-memory/src/drivers/login/login.service.ts","../../../libs/auth/driver/in-memory/src/drivers/register/register.service.ts","../../../libs/auth/driver/in-memory/src/drivers/reset-password/service.ts","../../../libs/auth/driver/in-memory/src/drivers/auth-driver.module.ts","../../../libs/auth/driver/in-memory/src/backend/auth.service.ts","../../../libs/auth/driver/in-memory/src/daffodil-auth-driver-in-memory.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryAuthService implements DaffAuthServiceInterface {\n url = '/api/auth/';\n\n constructor(private http: HttpClient) {}\n\n check(): Observable<void> {\n return this.http.post(`${this.url}check`, {}).pipe(\n map(() => undefined),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n throwError,\n} from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryLoginService implements DaffLoginServiceInterface {\n url = '/api/auth/';\n\n constructor(private http: HttpClient) {}\n\n login(request: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.http.post<DaffAuthToken>(`${this.url}login`, request);\n }\n\n logout(): Observable<void> {\n return this.http.post<{success: boolean}>(`${this.url}logout`, {}).pipe(\n switchMap(({ success }) => success ? of(undefined) : throwError(() => new Error('Logout failed'))),\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport { DaffRegisterServiceInterface } from '@daffodil/auth/driver';\n\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryRegisterService implements DaffRegisterServiceInterface {\n url = '/api/auth/';\n\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly(registration: DaffAccountRegistration): Observable<void> {\n return this.http.post<void>(`${this.url}register`, registration);\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n map,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\n\nimport { DaffInMemoryLoginService } from '../login/login.service';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryResetPasswordService implements DaffResetPasswordServiceInterface {\n url = '/api/auth/';\n\n constructor(\n private http: HttpClient,\n private loginService: DaffInMemoryLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly(info: DaffAuthResetPasswordInfo): Observable<void> {\n return this.http.post<void>(`${this.url}resetPassword`, info);\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.http.post<void>(`${this.url}sendResetEmail`, { email });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffLoginDriver,\n DaffRegisterDriver,\n DaffAuthDriver,\n DaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffInMemoryAuthService } from './auth/auth.service';\nimport { DaffInMemoryLoginService } from './login/login.service';\nimport { DaffInMemoryRegisterService } from './register/register.service';\nimport { DaffInMemoryResetPasswordService } from './reset-password/service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthInMemoryDriverModule> {\n return {\n ngModule: DaffAuthInMemoryDriverModule,\n providers: [\n {\n provide: DaffLoginDriver,\n useExisting: DaffInMemoryLoginService,\n },\n {\n provide: DaffRegisterDriver,\n useExisting: DaffInMemoryRegisterService,\n },\n {\n provide: DaffAuthDriver,\n useExisting: DaffInMemoryAuthService,\n },\n {\n provide: DaffResetPasswordDriver,\n useExisting: DaffInMemoryResetPasswordService,\n },\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\nimport {\n InMemoryDbService,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemoryDbCustomer } from '../models/db-customer.type';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendAuthService implements InMemoryDbService {\n customers: Record<DaffInMemoryDbCustomer['email'], DaffInMemoryDbCustomer> = {};\n\n private generateToken(): string {\n return faker.random.alphaNumeric(16);\n }\n\n createDb() {\n return {\n auth: this.customers,\n };\n }\n\n post(reqInfo) {\n if (reqInfo.id === 'login') {\n return this.login(reqInfo);\n } else if (reqInfo.id === 'register') {\n return this.register(reqInfo);\n } else if (reqInfo.id === 'logout') {\n return this.logout(reqInfo);\n } else if (reqInfo.id === 'check') {\n return this.check(reqInfo);\n } else if (reqInfo.id === 'resetPassword') {\n return this.resetPassword(reqInfo);\n } else if (reqInfo.id === 'sendResetEmail') {\n return this.sendResetEmail(reqInfo);\n }\n }\n\n private login(reqInfo: any) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n const customer = this.customers[email];\n\n if (password && customer?.password === password) {\n this.customers[email].token = this.generateToken();\n\n return reqInfo.utils.createResponse$(() => ({\n body: {\n token: customer.token,\n },\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private register(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n this.customers[email] = {\n email,\n password,\n };\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.CREATED,\n }));\n }\n\n private logout(reqInfo) {\n const {\n email,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].token = null;\n }\n\n return reqInfo.utils.createResponse$(() => ({\n body: { success: true },\n status: STATUS.OK,\n }));\n }\n\n private check(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n\n private resetPassword(reqInfo) {\n const {\n email,\n password,\n } = reqInfo.utils.getJsonBody(reqInfo.req);\n\n if (this.customers[email]) {\n this.customers[email].password = password;\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.OK,\n }));\n }\n\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.UNAUTHORIZED,\n }));\n }\n\n private sendResetEmail(reqInfo) {\n return reqInfo.utils.createResponse$(() => ({\n body: {},\n status: STATUS.OK,\n }));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.DaffInMemoryLoginService"],"mappings":";;;;;;;;;;AAOA;;AAEG;MAIU,uBAAuB,CAAA;AAGlC,IAAA,WAAA,CAAoB,IAAgB,EAAA;AAAhB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAFpC,QAAA,IA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