@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
@@ -1,119 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject } from '@angular/core';
3
- import { DaffInheritableError } from '@daffodil/core';
4
- import { of, switchMap, throwError } from 'rxjs';
5
- import * as i1 from '@daffodil/auth';
6
- import { DaffAuthMissingTokenError } from '@daffodil/auth';
7
-
8
- const DaffAuthDriver = new InjectionToken('DaffAuthDriver');
9
-
10
- const DaffLoginDriver = new InjectionToken('DaffLoginDriver');
11
-
12
- const DaffRegisterDriver = new InjectionToken('DaffRegisterDriver');
13
-
14
- const DaffResetPasswordDriver = new InjectionToken('DaffResetPasswordDriver');
15
-
16
- var DaffAuthDriverErrorCodes;
17
- (function (DaffAuthDriverErrorCodes) {
18
- DaffAuthDriverErrorCodes["AUTHENTICATION_FAILED"] = "DAFF_AUTH_AUTHENTICATION_FAILED";
19
- DaffAuthDriverErrorCodes["INVALID_API_RESPONSE"] = "DAFF_AUTH_INVALID_API_RESPONSE";
20
- DaffAuthDriverErrorCodes["REGISTRATION_FAILED"] = "DAFF_AUTH_REGISTRATION_FAILED";
21
- DaffAuthDriverErrorCodes["UNAUTHORIZED"] = "DAFF_AUTH_UNAUTHORIZED";
22
- })(DaffAuthDriverErrorCodes || (DaffAuthDriverErrorCodes = {}));
23
-
24
- class DaffUnauthorizedError extends DaffInheritableError {
25
- constructor(message) {
26
- super(message);
27
- this.message = message;
28
- this.code = DaffAuthDriverErrorCodes.UNAUTHORIZED;
29
- }
30
- }
31
-
32
- class DaffAuthenticationFailedError extends DaffInheritableError {
33
- constructor(message) {
34
- super(message);
35
- this.message = message;
36
- this.code = DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED;
37
- }
38
- }
39
-
40
- /**
41
- * An error thrown when registration failed.
42
- */
43
- class DaffRegistrationFailedError extends DaffInheritableError {
44
- constructor(message) {
45
- super(message);
46
- this.message = message;
47
- this.code = DaffAuthDriverErrorCodes.REGISTRATION_FAILED;
48
- }
49
- }
50
-
51
- class DaffAuthInvalidAPIResponseError extends DaffInheritableError {
52
- constructor(message) {
53
- super(message);
54
- this.message = message;
55
- this.code = DaffAuthDriverErrorCodes.INVALID_API_RESPONSE;
56
- }
57
- }
58
-
59
- /**
60
- * A mapping from error codes to error class constructors.
61
- */
62
- const DaffAuthDriverErrorMap = {
63
- [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,
64
- [DaffAuthDriverErrorCodes.INVALID_API_RESPONSE]: DaffAuthInvalidAPIResponseError,
65
- [DaffAuthDriverErrorCodes.REGISTRATION_FAILED]: DaffRegistrationFailedError,
66
- [DaffAuthDriverErrorCodes.UNAUTHORIZED]: DaffUnauthorizedError,
67
- };
68
-
69
- class DaffAuthDriverTokenCheck {
70
- constructor(storage, driver) {
71
- this.storage = storage;
72
- this.driver = driver;
73
- }
74
- /**
75
- * Checks if the auth token in storage is valid.
76
- * If there is not an auth token in storage, the driver is not called
77
- * and an error is immediately thrown.
78
- */
79
- check() {
80
- return of(null).pipe(switchMap(() => {
81
- const token = this.storage.getAuthToken();
82
- if (!token) {
83
- return throwError(() => new DaffAuthMissingTokenError('There is not an auth token in storage'));
84
- }
85
- return this.driver.check();
86
- }));
87
- }
88
- }
89
- /** @nocollapse */ DaffAuthDriverTokenCheck.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthDriverTokenCheck, deps: [{ token: i1.DaffAuthStorageService }, { token: DaffAuthDriver }], target: i0.ɵɵFactoryTarget.Injectable });
90
- /** @nocollapse */ DaffAuthDriverTokenCheck.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthDriverTokenCheck, providedIn: 'root' });
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthDriverTokenCheck, decorators: [{
92
- type: Injectable,
93
- args: [{
94
- providedIn: 'root',
95
- }]
96
- }], ctorParameters: function () {
97
- return [{ type: i1.DaffAuthStorageService }, { type: undefined, decorators: [{
98
- type: Inject,
99
- args: [DaffAuthDriver]
100
- }] }];
101
- } });
102
-
103
- /**
104
- * The error codes that indicate that the user definitely should not be in an unauthenticated state
105
- * and if an auth token exists in storage, it is invalid.
106
- * These are contrasted to network failures and other sporadic and generic errors that aren't
107
- * a guarantee of the token's invalidity.
108
- */
109
- const DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES = {
110
- [DaffAuthDriverErrorCodes.UNAUTHORIZED]: true,
111
- [DaffAuthDriverErrorCodes.AUTHENTICATION_FAILED]: true,
112
- };
113
-
114
- /**
115
- * Generated bundle index. Do not edit.
116
- */
117
-
118
- export { DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES, DaffAuthDriver, DaffAuthDriverErrorCodes, DaffAuthDriverErrorMap, DaffAuthDriverTokenCheck, DaffAuthInvalidAPIResponseError, DaffAuthenticationFailedError, DaffLoginDriver, DaffRegisterDriver, DaffRegistrationFailedError, DaffResetPasswordDriver, DaffUnauthorizedError };
119
- //# sourceMappingURL=daffodil-auth-driver.mjs.map
@@ -1 +0,0 @@
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 { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface DaffAuthServiceInterface {\n /**\n * Checks the validity of an auth token.\n */\n check(): Observable<void>;\n}\n\nexport const DaffAuthDriver = new InjectionToken<DaffAuthServiceInterface>('DaffAuthDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\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 DaffLoginDriver = new InjectionToken<DaffLoginServiceInterface>('DaffLoginDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\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 DaffRegisterDriver = new InjectionToken<DaffRegisterServiceInterface>('DaffRegisterDriver');\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\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 DaffResetPasswordDriver = new InjectionToken<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\t 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\t 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\t 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 map,\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":";;;;;;;MAUa,cAAc,GAAG,IAAI,cAAc,CAA2B,gBAAgB;;MCe9E,eAAe,GAAG,IAAI,cAAc,CAA4B,iBAAiB;;MCAjF,kBAAkB,GAAG,IAAI,cAAc,CAA+B,oBAAoB;;MCA1F,uBAAuB,GAAG,IAAI,cAAc,CAAoC,yBAAyB;;ACzB1G,IAAA,yBAKX;AALD,CAAA,UAAY,wBAAwB,EAAA;AAClC,IAAA,wBAAA,CAAA,uBAAA,CAAA,GAAA,iCAAyD,CAAA;AACzD,IAAA,wBAAA,CAAA,sBAAA,CAAA,GAAA,gCAAuD,CAAA;AACvD,IAAA,wBAAA,CAAA,qBAAA,CAAA,GAAA,+BAAqD,CAAA;AACrD,IAAA,wBAAA,CAAA,cAAA,CAAA,GAAA,wBAAuC,CAAA;AACzC,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,GAKnC,EAAA,CAAA,CAAA;;ACEK,MAAO,qBAAsB,SAAQ,oBAAoB,CAAA;AAG7D,IAAA,WAAA,CAAmB,OAAe,EAAA;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC;AADG,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;AAFlB,QAAA,IAAA,CAAA,IAAI,GAAW,wBAAwB,CAAC,YAAY,CAAC;KAIpE;AACF;;ACNK,MAAO,6BAA8B,SAAQ,oBAAoB,CAAA;AAGrE,IAAA,WAAA,CAAmB,OAAe,EAAA;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC;AADG,QAAA,IAAO,CAAA,OA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;gBACV,OAAO,UAAU,CAAC,MAAM,IAAI,yBAAyB,CAAC,uCAAuC,CAAC,CAAC,CAAC;AACjG,aAAA;AAED,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;SAC5B,CAAC,CACH,CAAC;KACH;;AAvBU,mBAAA,wBAAA,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,mBAAA,wBAAA,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;iBACnB,CAAA;;;8BAII,MAAM;+BAAC,cAAc,CAAA;;;;AC1B1B;;;;;AAKG;AACU,MAAA,qCAAqC,GAAG;AACnD,IAAA,CAAC,wBAAwB,CAAC,YAAY,GAAG,IAAI;AAC7C,IAAA,CAAC,wBAAwB,CAAC,qBAAqB,GAAG,IAAI;;;ACVxD;;AAEG;;;;"}
@@ -1,262 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject, NgModule, inject } from '@angular/core';
3
- import { of, from, EMPTY } from 'rxjs';
4
- import { tap, map, catchError, filter, switchMap } from 'rxjs/operators';
5
- import * as i1 from '@daffodil/auth/driver';
6
- import { DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES } from '@daffodil/auth/driver';
7
- import * as i1$1 from '@daffodil/auth/state';
8
- import { DaffAuthGuardLogout, DAFF_AUTH_ERROR_MATCHER, DaffResetPasswordLanding, DaffAuthActionTypes, DaffAuthLoginActionTypes, DaffAuthRegisterActionTypes, DaffAuthResetPasswordActionTypes, DAFF_AUTH_UNAUTHENTICATED_HOOKS } from '@daffodil/auth/state';
9
- import * as i2 from '@daffodil/auth';
10
- import * as i3 from '@angular/router';
11
- import { Router, ActivatedRoute } from '@angular/router';
12
- import * as i4 from '@ngrx/store';
13
- import * as i1$2 from '@ngrx/effects';
14
- import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
15
-
16
- const DaffAuthMemberOnlyGuardRedirectUrl = new InjectionToken('DaffAuthMemberOnlyGuardRedirectUrl', { factory: () => '/' });
17
-
18
- class MemberOnlyGuard {
19
- constructor(tokenCheck, storage, router, store, errorMatcher, redirectUrl) {
20
- this.tokenCheck = tokenCheck;
21
- this.storage = storage;
22
- this.router = router;
23
- this.store = store;
24
- this.errorMatcher = errorMatcher;
25
- this.redirectUrl = redirectUrl;
26
- }
27
- canActivate() {
28
- return this.isAuthenticated().pipe(tap(result => {
29
- if (!result) {
30
- this.router.navigateByUrl(this.redirectUrl);
31
- }
32
- }));
33
- }
34
- isAuthenticated() {
35
- return this.tokenCheck.check().pipe(map(() => true), catchError((error) => {
36
- if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {
37
- this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));
38
- }
39
- return of(false);
40
- }));
41
- }
42
- }
43
- /** @nocollapse */ MemberOnlyGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
44
- /** @nocollapse */ MemberOnlyGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MemberOnlyGuard, providedIn: 'any' });
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MemberOnlyGuard, decorators: [{
46
- type: Injectable,
47
- args: [{
48
- providedIn: 'any',
49
- }]
50
- }], ctorParameters: function () {
51
- return [{ type: i1.DaffAuthDriverTokenCheck }, { type: i2.DaffAuthStorageService }, { type: i3.Router }, { type: i4.Store }, { type: undefined, decorators: [{
52
- type: Inject,
53
- args: [DAFF_AUTH_ERROR_MATCHER]
54
- }] }, { type: undefined, decorators: [{
55
- type: Inject,
56
- args: [DaffAuthMemberOnlyGuardRedirectUrl]
57
- }] }];
58
- } });
59
-
60
- const DaffAuthGuestOnlyGuardRedirectUrl = new InjectionToken('DaffAuthGuestOnlyGuardRedirectUrl', { factory: () => '/' });
61
-
62
- class GuestOnlyGuard {
63
- constructor(tokenCheck, storage, router, store, errorMatcher, redirectUrl) {
64
- this.tokenCheck = tokenCheck;
65
- this.storage = storage;
66
- this.router = router;
67
- this.store = store;
68
- this.errorMatcher = errorMatcher;
69
- this.redirectUrl = redirectUrl;
70
- }
71
- canActivate() {
72
- return this.isUnauthenticated().pipe(tap(result => {
73
- if (!result) {
74
- this.router.navigateByUrl(this.redirectUrl);
75
- }
76
- }));
77
- }
78
- isUnauthenticated() {
79
- return this.tokenCheck.check().pipe(map(() => false), catchError((error) => {
80
- if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {
81
- this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));
82
- }
83
- return of(true);
84
- }));
85
- }
86
- }
87
- /** @nocollapse */ GuestOnlyGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
88
- /** @nocollapse */ GuestOnlyGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuestOnlyGuard, providedIn: 'any' });
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuestOnlyGuard, decorators: [{
90
- type: Injectable,
91
- args: [{
92
- providedIn: 'any',
93
- }]
94
- }], ctorParameters: function () {
95
- return [{ type: i1.DaffAuthDriverTokenCheck }, { type: i2.DaffAuthStorageService }, { type: i3.Router }, { type: i4.Store }, { type: undefined, decorators: [{
96
- type: Inject,
97
- args: [DAFF_AUTH_ERROR_MATCHER]
98
- }] }, { type: undefined, decorators: [{
99
- type: Inject,
100
- args: [DaffAuthGuestOnlyGuardRedirectUrl]
101
- }] }];
102
- } });
103
-
104
- const DAFF_AUTH_ROUTING_CONFIG_DEFAULT = {
105
- resetPasswordTokenParam: 'token',
106
- redirectUrlParam: 'redirect',
107
- authCompleteRedirectPath: '/',
108
- logoutRedirectPath: '/',
109
- tokenExpirationRedirectPath: '/',
110
- };
111
-
112
- /**
113
- * The token used to provide @daffodil/auth/routing config data.
114
- */
115
- const DAFF_AUTH_ROUTING_CONFIG = new InjectionToken('DAFF_AUTH_ROUTING_CONFIG', {
116
- factory: () => DAFF_AUTH_ROUTING_CONFIG_DEFAULT,
117
- });
118
- function provideDaffAuthRoutingConfig(config) {
119
- return {
120
- provide: DAFF_AUTH_ROUTING_CONFIG,
121
- useValue: Object.assign(Object.assign({}, DAFF_AUTH_ROUTING_CONFIG_DEFAULT), config || {}),
122
- };
123
- }
124
- ;
125
-
126
- class DaffAuthResetPasswordGuard {
127
- constructor(facade, config) {
128
- this.facade = facade;
129
- this.config = config;
130
- }
131
- canActivate(route) {
132
- const token = route.queryParamMap.get(this.config.resetPasswordTokenParam);
133
- if (!token) {
134
- return of(false);
135
- }
136
- this.facade.dispatch(new DaffResetPasswordLanding(token));
137
- return of(true);
138
- }
139
- }
140
- /** @nocollapse */ DaffAuthResetPasswordGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthResetPasswordGuard, deps: [{ token: i1$1.DaffAuthFacade }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
141
- /** @nocollapse */ DaffAuthResetPasswordGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthResetPasswordGuard, providedIn: 'any' });
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthResetPasswordGuard, decorators: [{
143
- type: Injectable,
144
- args: [{
145
- providedIn: 'any',
146
- }]
147
- }], ctorParameters: function () {
148
- return [{ type: i1$1.DaffAuthFacade }, { type: undefined, decorators: [{
149
- type: Inject,
150
- args: [DAFF_AUTH_ROUTING_CONFIG]
151
- }] }];
152
- } });
153
-
154
- function daffAuthRoutingRedirectUnauthenticatedHookFactory(router, route, config) {
155
- return (trigger) => {
156
- switch (trigger) {
157
- case DaffAuthLoginActionTypes.LogoutSuccessAction:
158
- return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.logoutRedirectPath));
159
- case DaffAuthActionTypes.AuthCheckFailureAction:
160
- case DaffAuthActionTypes.AuthGuardLogoutAction:
161
- return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.tokenExpirationRedirectPath));
162
- default:
163
- return of(null);
164
- }
165
- };
166
- }
167
-
168
- class DaffAuthRoutingModule {
169
- static withConfig(config) {
170
- return {
171
- ngModule: DaffAuthRoutingModule,
172
- providers: [
173
- provideDaffAuthRoutingConfig(config),
174
- ],
175
- };
176
- }
177
- }
178
- /** @nocollapse */ DaffAuthRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
179
- /** @nocollapse */ DaffAuthRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule });
180
- /** @nocollapse */ DaffAuthRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule, providers: [
181
- DaffAuthResetPasswordGuard,
182
- MemberOnlyGuard,
183
- GuestOnlyGuard,
184
- ] });
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingModule, decorators: [{
186
- type: NgModule,
187
- args: [{
188
- providers: [
189
- DaffAuthResetPasswordGuard,
190
- MemberOnlyGuard,
191
- GuestOnlyGuard,
192
- ],
193
- }]
194
- }] });
195
-
196
- /**
197
- * Redirects the user to certain pages based on certain auth actions.
198
- */
199
- class DaffAuthRedirectEffects {
200
- constructor(actions$, router, route, config) {
201
- this.actions$ = actions$;
202
- this.router = router;
203
- this.route = route;
204
- this.config = config;
205
- this.redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LoginSuccessAction, DaffAuthRegisterActionTypes.RegisterSuccessAction, DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction), filter((action) => {
206
- if ((action.type === DaffAuthRegisterActionTypes.RegisterSuccessAction || action.type === DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction) && !action.token) {
207
- return false;
208
- }
209
- return true;
210
- }), tap((action) => {
211
- this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.config.redirectUrlParam) || this.config.authCompleteRedirectPath);
212
- }), switchMap(() => EMPTY)), { dispatch: false });
213
- }
214
- }
215
- /** @nocollapse */ DaffAuthRedirectEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$2.Actions }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: DAFF_AUTH_ROUTING_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
216
- /** @nocollapse */ DaffAuthRedirectEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRedirectEffects });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
218
- type: Injectable
219
- }], ctorParameters: function () {
220
- return [{ type: i1$2.Actions }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: undefined, decorators: [{
221
- type: Inject,
222
- args: [DAFF_AUTH_ROUTING_CONFIG]
223
- }] }];
224
- } });
225
-
226
- class DaffAuthRoutingRedirectModule {
227
- }
228
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, imports: [i1$2.EffectsFeatureModule] });
230
- /** @nocollapse */ DaffAuthRoutingRedirectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, providers: [
231
- {
232
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
233
- multi: true,
234
- useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
235
- },
236
- ], imports: [EffectsModule.forFeature([
237
- DaffAuthRedirectEffects,
238
- ])] });
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthRoutingRedirectModule, decorators: [{
240
- type: NgModule,
241
- args: [{
242
- imports: [
243
- EffectsModule.forFeature([
244
- DaffAuthRedirectEffects,
245
- ]),
246
- ],
247
- providers: [
248
- {
249
- provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,
250
- multi: true,
251
- useFactory: (() => daffAuthRoutingRedirectUnauthenticatedHookFactory(inject(Router), inject(ActivatedRoute), inject(DAFF_AUTH_ROUTING_CONFIG))),
252
- },
253
- ],
254
- }]
255
- }] });
256
-
257
- /**
258
- * Generated bundle index. Do not edit.
259
- */
260
-
261
- export { DAFF_AUTH_ROUTING_CONFIG, DAFF_AUTH_ROUTING_CONFIG_DEFAULT, DaffAuthGuestOnlyGuardRedirectUrl, DaffAuthMemberOnlyGuardRedirectUrl, DaffAuthResetPasswordGuard, DaffAuthRoutingModule, DaffAuthRoutingRedirectModule, GuestOnlyGuard, MemberOnlyGuard, daffAuthRoutingRedirectUnauthenticatedHookFactory, provideDaffAuthRoutingConfig };
262
- //# sourceMappingURL=daffodil-auth-routing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daffodil-auth-routing.mjs","sources":["../../../libs/auth/routing/src/guards/member-only-guard-redirect.token.ts","../../../libs/auth/routing/src/guards/member-only.guard.ts","../../../libs/auth/routing/src/guards/guest-only-guard-redirect.token.ts","../../../libs/auth/routing/src/guards/guest-only.guard.ts","../../../libs/auth/routing/src/config/default.ts","../../../libs/auth/routing/src/config/token.ts","../../../libs/auth/routing/src/guards/reset-password.guard.ts","../../../libs/auth/routing/src/helpers/redirect-unauthenticated-hook-factory.ts","../../../libs/auth/routing/src/module.ts","../../../libs/auth/routing/src/effects/redirect.effects.ts","../../../libs/auth/routing/src/redirect.module.ts","../../../libs/auth/routing/src/daffodil-auth-routing.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const DaffAuthMemberOnlyGuardRedirectUrl = new InjectionToken<string>('DaffAuthMemberOnlyGuardRedirectUrl', { factory: () => '/' });\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n CanActivate,\n Router,\n} from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n tap,\n} from 'rxjs/operators';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthGuardLogout,\n} from '@daffodil/auth/state';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport { DaffAuthMemberOnlyGuardRedirectUrl } from './member-only-guard-redirect.token';\n\n\n@Injectable({\n providedIn: 'any',\n})\nexport class MemberOnlyGuard implements CanActivate {\n constructor(\n private tokenCheck: DaffAuthDriverTokenCheck,\n private storage: DaffAuthStorageService,\n private router: Router,\n private store: Store,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n @Inject(DaffAuthMemberOnlyGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.isAuthenticated().pipe(\n tap(result => {\n if (!result) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n\n private isAuthenticated(): Observable<boolean> {\n return this.tokenCheck.check().pipe(\n map(() => true),\n catchError((error: DaffError) => {\n if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {\n this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));\n }\n return of(false);\n }),\n );\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const DaffAuthGuestOnlyGuardRedirectUrl = new InjectionToken<string>('DaffAuthGuestOnlyGuardRedirectUrl', { factory: () => '/' });\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n CanActivate,\n Router,\n} from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport {\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n tap,\n} from 'rxjs/operators';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES,\n DaffAuthDriverErrorCodes,\n DaffAuthDriverTokenCheck,\n} from '@daffodil/auth/driver';\nimport {\n DAFF_AUTH_ERROR_MATCHER,\n DaffAuthGuardLogout,\n} from '@daffodil/auth/state';\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\n\nimport { DaffAuthGuestOnlyGuardRedirectUrl } from './guest-only-guard-redirect.token';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class GuestOnlyGuard implements CanActivate {\n constructor(\n private tokenCheck: DaffAuthDriverTokenCheck,\n private storage: DaffAuthStorageService,\n private router: Router,\n private store: Store,\n @Inject(DAFF_AUTH_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n @Inject(DaffAuthGuestOnlyGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.isUnauthenticated().pipe(\n tap(result => {\n if (!result) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n\n private isUnauthenticated(): Observable<boolean> {\n return this.tokenCheck.check().pipe(\n map(() => false),\n catchError((error: DaffError) => {\n if (DAFF_AUTH_UNAUTHENTICATED_ERROR_CODES[error.code]) {\n this.store.dispatch(new DaffAuthGuardLogout(this.errorMatcher(error)));\n }\n return of(true);\n }),\n );\n }\n}\n","import { DaffAuthRoutingConfig } from './interface';\n\nexport const DAFF_AUTH_ROUTING_CONFIG_DEFAULT: DaffAuthRoutingConfig = {\n resetPasswordTokenParam: 'token',\n redirectUrlParam: 'redirect',\n authCompleteRedirectPath: '/',\n logoutRedirectPath: '/',\n tokenExpirationRedirectPath: '/',\n};\n","import {\n InjectionToken,\n ValueProvider,\n} from '@angular/core';\n\nimport { DAFF_AUTH_ROUTING_CONFIG_DEFAULT } from './default';\nimport { DaffAuthRoutingConfig } from './interface';\n\n/**\n * The token used to provide @daffodil/auth/routing config data.\n */\nexport const DAFF_AUTH_ROUTING_CONFIG = new InjectionToken<DaffAuthRoutingConfig>('DAFF_AUTH_ROUTING_CONFIG', {\n factory: () => DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n});\n\nexport function provideDaffAuthRoutingConfig(config?: Partial<DaffAuthRoutingConfig>): ValueProvider {\n return {\n provide: DAFF_AUTH_ROUTING_CONFIG,\n useValue: {\n ...DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n ...config || {},\n },\n };\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n} from '@angular/router';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffAuthFacade,\n DaffResetPasswordLanding,\n} from '@daffodil/auth/state';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n} from '../config/public_api';\n\n@Injectable({\n providedIn: 'any',\n})\nexport class DaffAuthResetPasswordGuard implements CanActivate {\n constructor(\n private facade: DaffAuthFacade,\n @Inject(DAFF_AUTH_ROUTING_CONFIG) private config: DaffAuthRoutingConfig,\n ) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> {\n const token = route.queryParamMap.get(this.config.resetPasswordTokenParam);\n\n if (!token) {\n return of(false);\n }\n\n this.facade.dispatch(new DaffResetPasswordLanding(token));\n\n return of(true);\n }\n}\n","import {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n from,\n of,\n} from 'rxjs';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthLoginActionTypes,\n DaffAuthUnauthenticatedHook,\n} from '@daffodil/auth/state';\n\nimport { DaffAuthRoutingConfig } from '../config/public_api';\n\nexport function daffAuthRoutingRedirectUnauthenticatedHookFactory(router: Router, route: ActivatedRoute, config: DaffAuthRoutingConfig): DaffAuthUnauthenticatedHook {\n return (trigger) => {\n switch (trigger) {\n case DaffAuthLoginActionTypes.LogoutSuccessAction:\n return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.logoutRedirectPath));\n\n case DaffAuthActionTypes.AuthCheckFailureAction:\n case DaffAuthActionTypes.AuthGuardLogoutAction:\n return from(router.navigateByUrl(route.snapshot.queryParamMap.get(config.redirectUrlParam) || config.tokenExpirationRedirectPath));\n\n default:\n return of(null);\n }\n };\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n DAFF_AUTH_ROUTING_CONFIG_DEFAULT,\n provideDaffAuthRoutingConfig,\n} from './config/public_api';\nimport {\n DaffAuthResetPasswordGuard,\n GuestOnlyGuard,\n MemberOnlyGuard,\n} from './guards/public_api';\n\n@NgModule({\n providers: [\n DaffAuthResetPasswordGuard,\n MemberOnlyGuard,\n GuestOnlyGuard,\n ],\n})\nexport class DaffAuthRoutingModule {\n static withConfig(config?: Partial<DaffAuthRoutingConfig>): ModuleWithProviders<DaffAuthRoutingModule> {\n return {\n ngModule: DaffAuthRoutingModule,\n providers: [\n provideDaffAuthRoutingConfig(config),\n ],\n };\n }\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { EMPTY } from 'rxjs';\nimport {\n filter,\n switchMap,\n tap,\n} from 'rxjs/operators';\n\nimport {\n DaffAuthActionTypes,\n DaffAuthActions,\n DaffAuthLoginActionTypes,\n DaffAuthLoginActions,\n DaffAuthRegisterActionTypes,\n DaffAuthRegisterActions,\n DaffAuthResetPasswordActionTypes,\n DaffAuthResetPasswordActions,\n} from '@daffodil/auth/state';\n\nimport {\n DaffAuthRoutingConfig,\n DAFF_AUTH_ROUTING_CONFIG,\n} from '../config/public_api';\n\n/**\n * Redirects the user to certain pages based on certain auth actions.\n */\n@Injectable()\nexport class DaffAuthRedirectEffects {\n constructor(\n private actions$: Actions<DaffAuthLoginActions | DaffAuthActions | DaffAuthRegisterActions | DaffAuthResetPasswordActions>,\n private router: Router,\n private route: ActivatedRoute,\n @Inject(DAFF_AUTH_ROUTING_CONFIG) private config: DaffAuthRoutingConfig,\n ) {}\n\n redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(\n ofType(\n DaffAuthLoginActionTypes.LoginSuccessAction,\n DaffAuthRegisterActionTypes.RegisterSuccessAction,\n DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction,\n ),\n filter((action) => {\n if ((action.type === DaffAuthRegisterActionTypes.RegisterSuccessAction || action.type === DaffAuthResetPasswordActionTypes.ResetPasswordSuccessAction) && !action.token) {\n return false;\n }\n return true;\n }),\n tap((action) => {\n this.router.navigateByUrl(this.route.snapshot.queryParamMap.get(this.config.redirectUrlParam) || this.config.authCompleteRedirectPath);\n }),\n switchMap(() => EMPTY),\n ), { dispatch: false });\n}\n","import {\n NgModule,\n inject,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n Router,\n} from '@angular/router';\nimport { EffectsModule } from '@ngrx/effects';\nimport {\n from,\n of,\n} from 'rxjs';\n\nimport {\n DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n DaffAuthActionTypes,\n DaffAuthLoginActionTypes,\n DaffAuthUnauthenticatedHook,\n} from '@daffodil/auth/state';\n\nimport { DAFF_AUTH_ROUTING_CONFIG } from './config/public_api';\nimport { DaffAuthRedirectEffects } from './effects/redirect.effects';\nimport { daffAuthRoutingRedirectUnauthenticatedHookFactory } from './helpers/public_api';\n\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([\n DaffAuthRedirectEffects,\n ]),\n ],\n providers: [\n {\n provide: DAFF_AUTH_UNAUTHENTICATED_HOOKS,\n multi: true,\n useFactory: () =>\n daffAuthRoutingRedirectUnauthenticatedHookFactory(\n inject(Router),\n inject(ActivatedRoute),\n inject(DAFF_AUTH_ROUTING_CONFIG),\n ),\n },\n ],\n})\nexport class DaffAuthRoutingRedirectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAEa,MAAA,kCAAkC,GAAG,IAAI,cAAc,CAAS,oCAAoC,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,EAAE;;MCoC5H,eAAe,CAAA;IAC1B,WACU,CAAA,UAAoC,EACpC,OAA+B,EAC/B,MAAc,EACd,KAAY,EACqB,YAA8B,EACnB,WAAmB,EAAA;AAL/D,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAA0B;AACpC,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAwB;AAC/B,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AACd,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO;AACqB,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;AACnB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;KACrE;IAEJ,WAAW,GAAA;QACT,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAChC,GAAG,CAAC,MAAM,IAAG;YACX,IAAI,CAAC,MAAM,EAAE;gBACX,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7C,aAAA;SACF,CAAC,CACH,CAAC;KACH;IAEO,eAAe,GAAA;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,IAAI,CACjC,GAAG,CAAC,MAAM,IAAI,CAAC,EACf,UAAU,CAAC,CAAC,KAAgB,KAAI;AAC9B,YAAA,IAAI,qCAAqC,CAAC,KAAK,C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MAAM,CAAC,EACd,MAAM,CAAC,cAAc,CAAC,EACtB,MAAM,CAAC,wBAAwB,CAAC,CACjC,CAAA;AACJ,yBAAA;AACF,qBAAA;iBACF,CAAA;;;AC5CD;;AAEG;;;;"}
@@ -1,107 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, NgModule } from '@angular/core';
3
- import { DaffAuthFacade, DaffAuthLoginFacade, DaffAuthRegisterFacade, DaffAuthResetPasswordFacade } from '@daffodil/auth/state';
4
- import { BehaviorSubject } from 'rxjs';
5
-
6
- /**
7
- * @inheritdoc
8
- */
9
- class MockDaffAuthFacade {
10
- constructor() {
11
- this.loading$ = new BehaviorSubject(false);
12
- this.errors$ = new BehaviorSubject([]);
13
- this.loggedIn$ = new BehaviorSubject(false);
14
- }
15
- dispatch(action) { }
16
- ;
17
- }
18
- /** @nocollapse */ MockDaffAuthFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
19
- /** @nocollapse */ MockDaffAuthFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthFacade, providedIn: 'root' });
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthFacade, decorators: [{
21
- type: Injectable,
22
- args: [{ providedIn: 'root' }]
23
- }] });
24
-
25
- /**
26
- * @inheritdoc
27
- */
28
- class MockDaffAuthLoginFacade {
29
- constructor() {
30
- this.loading$ = new BehaviorSubject(false);
31
- this.errors$ = new BehaviorSubject([]);
32
- }
33
- dispatch(action) { }
34
- ;
35
- }
36
- /** @nocollapse */ MockDaffAuthLoginFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthLoginFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
- /** @nocollapse */ MockDaffAuthLoginFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthLoginFacade, providedIn: 'root' });
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthLoginFacade, decorators: [{
39
- type: Injectable,
40
- args: [{ providedIn: 'root' }]
41
- }] });
42
-
43
- /**
44
- * @inheritdoc
45
- */
46
- class MockDaffAuthRegisterFacade {
47
- constructor() {
48
- this.loading$ = new BehaviorSubject(false);
49
- this.errors$ = new BehaviorSubject([]);
50
- }
51
- dispatch(action) { }
52
- ;
53
- }
54
- /** @nocollapse */ MockDaffAuthRegisterFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthRegisterFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
55
- /** @nocollapse */ MockDaffAuthRegisterFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthRegisterFacade, providedIn: 'root' });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthRegisterFacade, decorators: [{
57
- type: Injectable,
58
- args: [{ providedIn: 'root' }]
59
- }] });
60
-
61
- /**
62
- * @inheritdoc
63
- */
64
- class MockDaffAuthResetPasswordFacade {
65
- constructor() {
66
- this.token$ = new BehaviorSubject('');
67
- this.loading$ = new BehaviorSubject(false);
68
- this.errors$ = new BehaviorSubject([]);
69
- }
70
- dispatch(action) { }
71
- ;
72
- }
73
- /** @nocollapse */ MockDaffAuthResetPasswordFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthResetPasswordFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
74
- /** @nocollapse */ MockDaffAuthResetPasswordFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthResetPasswordFacade, providedIn: 'root' });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MockDaffAuthResetPasswordFacade, decorators: [{
76
- type: Injectable,
77
- args: [{ providedIn: 'root' }]
78
- }] });
79
-
80
- class DaffAuthStateTestingModule {
81
- }
82
- /** @nocollapse */ DaffAuthStateTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
83
- /** @nocollapse */ DaffAuthStateTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateTestingModule });
84
- /** @nocollapse */ DaffAuthStateTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateTestingModule, providers: [
85
- { provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },
86
- { provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },
87
- { provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },
88
- { provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },
89
- ] });
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DaffAuthStateTestingModule, decorators: [{
91
- type: NgModule,
92
- args: [{
93
- providers: [
94
- { provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },
95
- { provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },
96
- { provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },
97
- { provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },
98
- ],
99
- }]
100
- }] });
101
-
102
- /**
103
- * Generated bundle index. Do not edit.
104
- */
105
-
106
- export { DaffAuthStateTestingModule, MockDaffAuthFacade, MockDaffAuthLoginFacade, MockDaffAuthRegisterFacade, MockDaffAuthResetPasswordFacade };
107
- //# sourceMappingURL=daffodil-auth-state-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daffodil-auth-state-testing.mjs","sources":["../../../libs/auth/state/testing/src/mock-auth-facade.ts","../../../libs/auth/state/testing/src/mock-login-facade.ts","../../../libs/auth/state/testing/src/mock-register-facade.ts","../../../libs/auth/state/testing/src/mock-reset-password-facade.ts","../../../libs/auth/state/testing/src/auth-testing.module.ts","../../../libs/auth/state/testing/src/daffodil-auth-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthFacade implements DaffAuthFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n loggedIn$ = new BehaviorSubject<boolean>(false);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthLoginFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthLoginFacade implements DaffAuthLoginFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthRegisterFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthRegisterFacade implements DaffAuthRegisterFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffAuthResetPasswordFacadeInterface } from '@daffodil/auth/state';\nimport { DaffStateError } from '@daffodil/core/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffAuthResetPasswordFacade implements DaffAuthResetPasswordFacadeInterface {\n token$ = new BehaviorSubject<string>('');\n loading$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport {\n DaffAuthFacade,\n DaffAuthLoginFacade,\n DaffAuthRegisterFacade,\n DaffAuthResetPasswordFacade,\n} from '@daffodil/auth/state';\n\nimport { MockDaffAuthFacade } from './mock-auth-facade';\nimport { MockDaffAuthLoginFacade } from './mock-login-facade';\nimport { MockDaffAuthRegisterFacade } from './mock-register-facade';\nimport { MockDaffAuthResetPasswordFacade } from './mock-reset-password-facade';\n\n@NgModule({\n providers: [\n { provide: DaffAuthFacade, useExisting: MockDaffAuthFacade },\n { provide: DaffAuthLoginFacade, useExisting: MockDaffAuthLoginFacade },\n { provide: DaffAuthRegisterFacade, useExisting: MockDaffAuthRegisterFacade },\n { provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },\n ],\n})\nexport class DaffAuthStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;AAEG;MAEU,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;QAEE,IAAA,CAAA,QA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