django-hidp 1.4.0rc3__tar.gz

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 (293) hide show
  1. django_hidp-1.4.0rc3/MANIFEST.in +22 -0
  2. django_hidp-1.4.0rc3/Makefile +165 -0
  3. django_hidp-1.4.0rc3/Makefile.tasks.sh +93 -0
  4. django_hidp-1.4.0rc3/PKG-INFO +50 -0
  5. django_hidp-1.4.0rc3/README.md +8 -0
  6. django_hidp-1.4.0rc3/django_hidp.egg-info/PKG-INFO +50 -0
  7. django_hidp-1.4.0rc3/django_hidp.egg-info/SOURCES.txt +291 -0
  8. django_hidp-1.4.0rc3/django_hidp.egg-info/dependency_links.txt +1 -0
  9. django_hidp-1.4.0rc3/django_hidp.egg-info/requires.txt +30 -0
  10. django_hidp-1.4.0rc3/django_hidp.egg-info/top_level.txt +1 -0
  11. django_hidp-1.4.0rc3/docs/Makefile +20 -0
  12. django_hidp-1.4.0rc3/docs/conf.py +30 -0
  13. django_hidp-1.4.0rc3/docs/configure-as-oidc-provider.md +207 -0
  14. django_hidp-1.4.0rc3/docs/configure-oidc-clients.md +162 -0
  15. django_hidp-1.4.0rc3/docs/content-security-policy.md +54 -0
  16. django_hidp-1.4.0rc3/docs/index.md +33 -0
  17. django_hidp-1.4.0rc3/docs/installation-extras.md +44 -0
  18. django_hidp-1.4.0rc3/docs/installation.md +256 -0
  19. django_hidp-1.4.0rc3/docs/management-commands.md +167 -0
  20. django_hidp-1.4.0rc3/docs/one-time-passwords.md +161 -0
  21. django_hidp-1.4.0rc3/docs/password-validation.md +43 -0
  22. django_hidp-1.4.0rc3/docs/rate-limiting.md +86 -0
  23. django_hidp-1.4.0rc3/docs/requirements.txt +3 -0
  24. django_hidp-1.4.0rc3/docs/templates.md +916 -0
  25. django_hidp-1.4.0rc3/docs/translations.md +95 -0
  26. django_hidp-1.4.0rc3/docs/user-model.md +39 -0
  27. django_hidp-1.4.0rc3/hidp/__init__.py +0 -0
  28. django_hidp-1.4.0rc3/hidp/accounts/__init__.py +0 -0
  29. django_hidp-1.4.0rc3/hidp/accounts/account_management_urls.py +98 -0
  30. django_hidp-1.4.0rc3/hidp/accounts/account_urls.py +85 -0
  31. django_hidp-1.4.0rc3/hidp/accounts/apps.py +8 -0
  32. django_hidp-1.4.0rc3/hidp/accounts/auth.py +101 -0
  33. django_hidp-1.4.0rc3/hidp/accounts/email_change.py +44 -0
  34. django_hidp-1.4.0rc3/hidp/accounts/email_verification.py +63 -0
  35. django_hidp-1.4.0rc3/hidp/accounts/forms.py +486 -0
  36. django_hidp-1.4.0rc3/hidp/accounts/mailers.py +347 -0
  37. django_hidp-1.4.0rc3/hidp/accounts/management/__init__.py +0 -0
  38. django_hidp-1.4.0rc3/hidp/accounts/management/commands/__init__.py +0 -0
  39. django_hidp-1.4.0rc3/hidp/accounts/management/commands/remove_complete_and_stale_email_change_requests.py +57 -0
  40. django_hidp-1.4.0rc3/hidp/accounts/management/commands/remove_stale_unverified_accounts.py +54 -0
  41. django_hidp-1.4.0rc3/hidp/accounts/migrations/0001_initial.py +35 -0
  42. django_hidp-1.4.0rc3/hidp/accounts/migrations/__init__.py +0 -0
  43. django_hidp-1.4.0rc3/hidp/accounts/models.py +403 -0
  44. django_hidp-1.4.0rc3/hidp/accounts/password_validation.py +54 -0
  45. django_hidp-1.4.0rc3/hidp/accounts/tokens.py +117 -0
  46. django_hidp-1.4.0rc3/hidp/accounts/views.py +1176 -0
  47. django_hidp-1.4.0rc3/hidp/api/__init__.py +0 -0
  48. django_hidp-1.4.0rc3/hidp/api/apps.py +8 -0
  49. django_hidp-1.4.0rc3/hidp/api/serializers.py +14 -0
  50. django_hidp-1.4.0rc3/hidp/api/urls.py +14 -0
  51. django_hidp-1.4.0rc3/hidp/api/views.py +26 -0
  52. django_hidp-1.4.0rc3/hidp/apps.py +11 -0
  53. django_hidp-1.4.0rc3/hidp/compat/__init__.py +0 -0
  54. django_hidp-1.4.0rc3/hidp/compat/uuid7.py +92 -0
  55. django_hidp-1.4.0rc3/hidp/config/__init__.py +7 -0
  56. django_hidp-1.4.0rc3/hidp/config/checks.py +234 -0
  57. django_hidp-1.4.0rc3/hidp/config/oauth2_provider.py +93 -0
  58. django_hidp-1.4.0rc3/hidp/config/oidc_clients.py +99 -0
  59. django_hidp-1.4.0rc3/hidp/config/urls.py +33 -0
  60. django_hidp-1.4.0rc3/hidp/csp/__init__.py +0 -0
  61. django_hidp-1.4.0rc3/hidp/csp/decorators.py +16 -0
  62. django_hidp-1.4.0rc3/hidp/csp/templatetags/__init__.py +0 -0
  63. django_hidp-1.4.0rc3/hidp/csp/templatetags/csp_nonce.py +8 -0
  64. django_hidp-1.4.0rc3/hidp/federated/__init__.py +0 -0
  65. django_hidp-1.4.0rc3/hidp/federated/apps.py +8 -0
  66. django_hidp-1.4.0rc3/hidp/federated/auth/__init__.py +0 -0
  67. django_hidp-1.4.0rc3/hidp/federated/auth/backends.py +38 -0
  68. django_hidp-1.4.0rc3/hidp/federated/constants.py +12 -0
  69. django_hidp-1.4.0rc3/hidp/federated/forms.py +138 -0
  70. django_hidp-1.4.0rc3/hidp/federated/management/__init__.py +0 -0
  71. django_hidp-1.4.0rc3/hidp/federated/management/commands/__init__.py +0 -0
  72. django_hidp-1.4.0rc3/hidp/federated/management/commands/refresh_oidc_clients_jwks.py +10 -0
  73. django_hidp-1.4.0rc3/hidp/federated/migrations/0001_initial.py +49 -0
  74. django_hidp-1.4.0rc3/hidp/federated/migrations/__init__.py +0 -0
  75. django_hidp-1.4.0rc3/hidp/federated/models.py +86 -0
  76. django_hidp-1.4.0rc3/hidp/federated/oidc/__init__.py +0 -0
  77. django_hidp-1.4.0rc3/hidp/federated/oidc/authorization_code_flow.py +652 -0
  78. django_hidp-1.4.0rc3/hidp/federated/oidc/exceptions.py +21 -0
  79. django_hidp-1.4.0rc3/hidp/federated/oidc/jwks.py +167 -0
  80. django_hidp-1.4.0rc3/hidp/federated/oidc_client_urls.py +58 -0
  81. django_hidp-1.4.0rc3/hidp/federated/oidc_management_urls.py +53 -0
  82. django_hidp-1.4.0rc3/hidp/federated/providers/__init__.py +0 -0
  83. django_hidp-1.4.0rc3/hidp/federated/providers/base.py +225 -0
  84. django_hidp-1.4.0rc3/hidp/federated/providers/google.py +56 -0
  85. django_hidp-1.4.0rc3/hidp/federated/providers/microsoft.py +44 -0
  86. django_hidp-1.4.0rc3/hidp/federated/tokens.py +49 -0
  87. django_hidp-1.4.0rc3/hidp/federated/views.py +564 -0
  88. django_hidp-1.4.0rc3/hidp/locale/django.pot +968 -0
  89. django_hidp-1.4.0rc3/hidp/locale/nl/LC_MESSAGES/django.mo +0 -0
  90. django_hidp-1.4.0rc3/hidp/locale/nl/LC_MESSAGES/django.po +969 -0
  91. django_hidp-1.4.0rc3/hidp/oidc_provider/__init__.py +0 -0
  92. django_hidp-1.4.0rc3/hidp/oidc_provider/apps.py +6 -0
  93. django_hidp-1.4.0rc3/hidp/oidc_provider/middleware.py +59 -0
  94. django_hidp-1.4.0rc3/hidp/oidc_provider/oauth_validators.py +95 -0
  95. django_hidp-1.4.0rc3/hidp/oidc_provider/urls.py +79 -0
  96. django_hidp-1.4.0rc3/hidp/oidc_provider/views.py +44 -0
  97. django_hidp-1.4.0rc3/hidp/otp/__init__.py +0 -0
  98. django_hidp-1.4.0rc3/hidp/otp/decorators.py +12 -0
  99. django_hidp-1.4.0rc3/hidp/otp/devices.py +70 -0
  100. django_hidp-1.4.0rc3/hidp/otp/exceptions.py +6 -0
  101. django_hidp-1.4.0rc3/hidp/otp/forms.py +109 -0
  102. django_hidp-1.4.0rc3/hidp/otp/mailers.py +58 -0
  103. django_hidp-1.4.0rc3/hidp/otp/middleware.py +200 -0
  104. django_hidp-1.4.0rc3/hidp/otp/otp_management_urls.py +38 -0
  105. django_hidp-1.4.0rc3/hidp/otp/otp_urls.py +14 -0
  106. django_hidp-1.4.0rc3/hidp/otp/views.py +278 -0
  107. django_hidp-1.4.0rc3/hidp/rate_limit/__init__.py +0 -0
  108. django_hidp-1.4.0rc3/hidp/rate_limit/decorators.py +24 -0
  109. django_hidp-1.4.0rc3/hidp/rate_limit/middleware.py +13 -0
  110. django_hidp-1.4.0rc3/hidp/rate_limit/views.py +11 -0
  111. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/forms/authentication_form.html +1 -0
  112. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/forms/rate_limited_authentication_form.html +1 -0
  113. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/forms/user_creation_form.html +1 -0
  114. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/login.html +56 -0
  115. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/logout_confirm.html +34 -0
  116. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/edit_account.html +14 -0
  117. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/edit_account_done.html +12 -0
  118. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_change_body.html +15 -0
  119. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_change_body.txt +16 -0
  120. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_change_subject.txt +3 -0
  121. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_changed_body.html +15 -0
  122. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_changed_body.txt +10 -0
  123. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/email_changed_subject.txt +3 -0
  124. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/password_changed_body.html +8 -0
  125. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/password_changed_body.txt +8 -0
  126. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/password_changed_subject.txt +3 -0
  127. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/proposed_email_exists_body.html +14 -0
  128. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/proposed_email_exists_body.txt +13 -0
  129. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email/proposed_email_exists_subject.txt +3 -0
  130. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_cancel.html +20 -0
  131. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_cancel_done.html +12 -0
  132. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_cancel_invalid_link.html +1 -0
  133. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_complete.html +27 -0
  134. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_confirm.html +22 -0
  135. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_confirm_invalid_link.html +1 -0
  136. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_request.html +29 -0
  137. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/email_change_request_sent.html +18 -0
  138. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/edit_user_form.html +1 -0
  139. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/email_change_cancel_form.html +1 -0
  140. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/email_change_confirm_form.html +1 -0
  141. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/email_change_request_form.html +1 -0
  142. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/password_change_form.html +1 -0
  143. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/forms/set_password_form.html +1 -0
  144. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/manage_account.html +27 -0
  145. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/password_change.html +14 -0
  146. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/password_change_done.html +12 -0
  147. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/set_password.html +34 -0
  148. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/management/set_password_done.html +12 -0
  149. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/password_reset_body.html +7 -0
  150. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/password_reset_body.txt +5 -0
  151. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/password_reset_subject.txt +3 -0
  152. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/set_password_body.html +9 -0
  153. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/set_password_body.txt +9 -0
  154. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/email/set_password_subject.txt +3 -0
  155. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/forms/password_reset_form.html +1 -0
  156. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/forms/password_reset_request_form.html +1 -0
  157. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/password_reset.html +18 -0
  158. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/password_reset_complete.html +12 -0
  159. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/password_reset_email_sent.html +12 -0
  160. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/password_reset_invalid_link.html +1 -0
  161. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/recovery/password_reset_request.html +20 -0
  162. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/register.html +60 -0
  163. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/tos.html +104 -0
  164. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/account_exists_body.html +16 -0
  165. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/account_exists_body.txt +13 -0
  166. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/account_exists_subject.txt +3 -0
  167. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/verification_body.html +14 -0
  168. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/verification_body.txt +11 -0
  169. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email/verification_subject.txt +3 -0
  170. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email_verification_complete.html +13 -0
  171. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email_verification_required.html +17 -0
  172. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/email_verification_required_invalid_link.html +1 -0
  173. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/forms/email_verification_form.html +1 -0
  174. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/verify_email.html +20 -0
  175. django_hidp-1.4.0rc3/hidp/templates/hidp/accounts/verification/verify_email_invalid_link.html +1 -0
  176. django_hidp-1.4.0rc3/hidp/templates/hidp/base.html +12 -0
  177. django_hidp-1.4.0rc3/hidp/templates/hidp/base_email.html +11 -0
  178. django_hidp-1.4.0rc3/hidp/templates/hidp/base_invalid_link.html +10 -0
  179. django_hidp-1.4.0rc3/hidp/templates/hidp/base_post_login.html +13 -0
  180. django_hidp-1.4.0rc3/hidp/templates/hidp/base_pre_login.html +16 -0
  181. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/account_link.html +39 -0
  182. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/account_link_done.html +14 -0
  183. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/account_unlink.html +28 -0
  184. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/account_unlink_done.html +14 -0
  185. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/forms/account_link_form.html +1 -0
  186. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/forms/account_unlink_form.html +1 -0
  187. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/forms/registration_form.html +1 -0
  188. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/linked_services.html +71 -0
  189. django_hidp-1.4.0rc3/hidp/templates/hidp/federated/registration.html +14 -0
  190. django_hidp-1.4.0rc3/hidp/templates/hidp/includes/federated/oidc_provider_list.html +10 -0
  191. django_hidp-1.4.0rc3/hidp/templates/hidp/includes/federated/oidc_provider_list_option.html +12 -0
  192. django_hidp-1.4.0rc3/hidp/templates/hidp/includes/forms/base_form.html +1 -0
  193. django_hidp-1.4.0rc3/hidp/templates/hidp/includes/forms/submit_row.html +20 -0
  194. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/disable.html +21 -0
  195. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/disable_recovery_code.html +18 -0
  196. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/configured_body.html +15 -0
  197. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/configured_body.txt +13 -0
  198. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/configured_subject.txt +3 -0
  199. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/disabled_body.html +17 -0
  200. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/disabled_body.txt +13 -0
  201. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/disabled_subject.txt +3 -0
  202. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_code_used_body.html +24 -0
  203. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_code_used_body.txt +19 -0
  204. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_code_used_subject.txt +3 -0
  205. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_codes_regenerated_body.html +18 -0
  206. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_codes_regenerated_body.txt +13 -0
  207. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/email/recovery_codes_regenerated_subject.txt +3 -0
  208. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/overview.html +47 -0
  209. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/recovery_codes.html +30 -0
  210. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/setup_device.html +71 -0
  211. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/setup_device_done.html +12 -0
  212. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/verify.html +19 -0
  213. django_hidp-1.4.0rc3/hidp/templates/hidp/otp/verify_recovery_code.html +16 -0
  214. django_hidp-1.4.0rc3/hidp/test/__init__.py +0 -0
  215. django_hidp-1.4.0rc3/hidp/test/factories/__init__.py +0 -0
  216. django_hidp-1.4.0rc3/hidp/test/factories/otp_factories.py +28 -0
  217. django_hidp-1.4.0rc3/hidp/test/factories/user_factories.py +35 -0
  218. django_hidp-1.4.0rc3/hidp/utils.py +23 -0
  219. django_hidp-1.4.0rc3/manage.py +23 -0
  220. django_hidp-1.4.0rc3/pyproject.toml +91 -0
  221. django_hidp-1.4.0rc3/requirements.txt +4 -0
  222. django_hidp-1.4.0rc3/requirements_local.txt +6 -0
  223. django_hidp-1.4.0rc3/requirements_oidc_provider.txt +2 -0
  224. django_hidp-1.4.0rc3/requirements_otp.txt +2 -0
  225. django_hidp-1.4.0rc3/runtests.py +20 -0
  226. django_hidp-1.4.0rc3/setup.cfg +4 -0
  227. django_hidp-1.4.0rc3/setup.py +3 -0
  228. django_hidp-1.4.0rc3/tests/__init__.py +0 -0
  229. django_hidp-1.4.0rc3/tests/custom_user/__init__.py +0 -0
  230. django_hidp-1.4.0rc3/tests/custom_user/migrations/0001_initial.py +49 -0
  231. django_hidp-1.4.0rc3/tests/custom_user/migrations/__init__.py +0 -0
  232. django_hidp-1.4.0rc3/tests/custom_user/models.py +5 -0
  233. django_hidp-1.4.0rc3/tests/smoke_tests/__init__.py +0 -0
  234. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/__init__.py +0 -0
  235. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_email_change.py +783 -0
  236. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_login.py +162 -0
  237. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_logout.py +57 -0
  238. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_management.py +271 -0
  239. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_recovery.py +198 -0
  240. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_signup.py +360 -0
  241. django_hidp-1.4.0rc3/tests/smoke_tests/test_accounts/test_verification.py +375 -0
  242. django_hidp-1.4.0rc3/tests/smoke_tests/test_federated/__init__.py +0 -0
  243. django_hidp-1.4.0rc3/tests/smoke_tests/test_federated/test_views.py +776 -0
  244. django_hidp-1.4.0rc3/tests/smoke_tests/test_oauth.py +326 -0
  245. django_hidp-1.4.0rc3/tests/smoke_tests/test_otp/__init__.py +0 -0
  246. django_hidp-1.4.0rc3/tests/smoke_tests/test_otp/test_views.py +439 -0
  247. django_hidp-1.4.0rc3/tests/test_settings.py +135 -0
  248. django_hidp-1.4.0rc3/tests/translations/__init__.py +0 -0
  249. django_hidp-1.4.0rc3/tests/translations/management/__init__.py +0 -0
  250. django_hidp-1.4.0rc3/tests/translations/management/commands/__init__.py +0 -0
  251. django_hidp-1.4.0rc3/tests/translations/management/commands/makemessages.py +84 -0
  252. django_hidp-1.4.0rc3/tests/unit_tests/__init__.py +0 -0
  253. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/__init__.py +0 -0
  254. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_auth.py +260 -0
  255. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_base_mailer.py +28 -0
  256. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_forms.py +96 -0
  257. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_password_validation.py +104 -0
  258. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_tokens.py +92 -0
  259. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_user_manager.py +70 -0
  260. django_hidp-1.4.0rc3/tests/unit_tests/test_accounts/test_user_model.py +67 -0
  261. django_hidp-1.4.0rc3/tests/unit_tests/test_api/__init__.py +0 -0
  262. django_hidp-1.4.0rc3/tests/unit_tests/test_api/test_views.py +192 -0
  263. django_hidp-1.4.0rc3/tests/unit_tests/test_config/__init__.py +0 -0
  264. django_hidp-1.4.0rc3/tests/unit_tests/test_config/test_checks.py +117 -0
  265. django_hidp-1.4.0rc3/tests/unit_tests/test_config/test_oidc_client_registry.py +109 -0
  266. django_hidp-1.4.0rc3/tests/unit_tests/test_csp/__init__.py +0 -0
  267. django_hidp-1.4.0rc3/tests/unit_tests/test_csp/test_decorators.py +50 -0
  268. django_hidp-1.4.0rc3/tests/unit_tests/test_csp/test_templatetags.py +22 -0
  269. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/__init__.py +0 -0
  270. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_auth/__init__.py +0 -0
  271. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_auth/test_oidc_backend.py +78 -0
  272. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_forms.py +115 -0
  273. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_models.py +57 -0
  274. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_oidc/__init__.py +0 -0
  275. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_oidc/test_authorization_code_flow.py +905 -0
  276. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_oidc/test_jwks.py +235 -0
  277. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_providers/__init__.py +0 -0
  278. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_providers/example.py +24 -0
  279. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_providers/test_base_oidc_client.py +132 -0
  280. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_providers/test_google_oidc_client.py +24 -0
  281. django_hidp-1.4.0rc3/tests/unit_tests/test_federated/test_providers/test_microsoft_oidc_client.py +24 -0
  282. django_hidp-1.4.0rc3/tests/unit_tests/test_otp/__init__.py +0 -0
  283. django_hidp-1.4.0rc3/tests/unit_tests/test_otp/test_decorators.py +22 -0
  284. django_hidp-1.4.0rc3/tests/unit_tests/test_otp/test_devices.py +79 -0
  285. django_hidp-1.4.0rc3/tests/unit_tests/test_otp/test_forms.py +37 -0
  286. django_hidp-1.4.0rc3/tests/unit_tests/test_otp/test_middleware.py +333 -0
  287. django_hidp-1.4.0rc3/tests/unit_tests/test_rate_limit/__init__.py +0 -0
  288. django_hidp-1.4.0rc3/tests/unit_tests/test_rate_limit/test_decorators.py +33 -0
  289. django_hidp-1.4.0rc3/tests/unit_tests/test_rate_limit/test_middleware.py +15 -0
  290. django_hidp-1.4.0rc3/tests/unit_tests/test_rate_limit/urls.py +7 -0
  291. django_hidp-1.4.0rc3/tests/unit_tests/test_rate_limit/views.py +5 -0
  292. django_hidp-1.4.0rc3/tests/unit_tests/test_translations/__init__.py +0 -0
  293. django_hidp-1.4.0rc3/tests/unit_tests/test_translations/test_middleware.py +61 -0
@@ -0,0 +1,22 @@
1
+ include Makefile
2
+ include Makefile.tasks.sh
3
+ include manage.py
4
+ include requirements.txt
5
+ include requirements_local.txt
6
+ include runtests.py
7
+ include docs/Makefile
8
+ include docs/conf.py
9
+ include docs/requirements.txt
10
+ recursive-include docs *.md
11
+ recursive-include hidp/locale *.mo *.po *.pot
12
+ recursive-include hidp/templates *.html *.txt
13
+ graft tests
14
+ global-exclude __pycache__
15
+ global-exclude *.py[co]
16
+ global-exclude .DS_Store
17
+ global-exclude Thumbs.db
18
+ global-exclude Desktop.ini
19
+ global-exclude *.swp
20
+ global-exclude *~
21
+ global-exclude *.bak
22
+ global-exclude var/*
@@ -0,0 +1,165 @@
1
+ .PHONY: help
2
+ help:
3
+ @echo "The following commands are meant to be run inside the python container:"
4
+ @echo
5
+ @echo " make test - Run lint, django-checks, migrationtest and coveragetest"
6
+ @echo " make messages - Update the message catalog"
7
+ @echo " make compilemessages - Compile the message catalog"
8
+ @echo " make lint - Check syntax and style"
9
+ @echo " make lintfix - Automatically fix syntax and style issues"
10
+ @echo " make migrationtest - Check if there are any model changes without migrations"
11
+ @echo " make checkmessages - Check if the message catalog is up to date and compile it"
12
+ @echo " make unittests - Run unit tests with coverage"
13
+ @echo " make coveragetest - Generate coverage report"
14
+ @echo " make coverage - Generate test coverage html report"
15
+ @echo " make django-checks - Run Django system checks"
16
+ @echo " make checkmanifest - Check if all files are included in the sdist"
17
+ @echo " make checksetup - Check package metadata"
18
+ @echo " make build - Build the package"
19
+ @echo
20
+
21
+ GITHUB_ACTIONS ?= false
22
+
23
+ # Helper function to define a GitHub Actions group
24
+ define group
25
+ @if [ "$(GITHUB_ACTIONS)" = "true" ]; then \
26
+ echo "::group::$1"; \
27
+ fi
28
+ endef
29
+
30
+ # Helper function to end a GitHub Actions group
31
+ define endgroup
32
+ @if [ "$(GITHUB_ACTIONS)" = "true" ]; then \
33
+ echo "::endgroup::"; \
34
+ fi
35
+ endef
36
+
37
+ .PHONY: test
38
+ test: lint django-checks migrationtest checkmessages coveragetest checkmanifest checksetup
39
+
40
+ .PHONY: lint
41
+ lint:
42
+ # Check syntax and style
43
+ $(call group,Checking syntax and style)
44
+ ruff check
45
+ ruff format --check --diff
46
+ $(call endgroup)
47
+
48
+ .PHONY: lintfix
49
+ lintfix:
50
+ # Automatically fix syntax and style issues
51
+ ruff check --fix-only
52
+ ruff format
53
+
54
+ .PHONY: migrationtest
55
+ migrationtest:
56
+ # Check if there are any model changes without migrations
57
+ $(call group,Checking for missing migrations)
58
+ ./manage.py makemigrations --dry-run --no-input --check --settings tests.test_settings
59
+ $(call endgroup)
60
+
61
+ .PHONY: messages
62
+ messages:
63
+ # Update the message catalog
64
+ ./manage.py makemessages
65
+
66
+ .PHONY: compilemessages
67
+ compilemessages:
68
+ # Update and compile the message catalog
69
+ ./manage.py compilemessages
70
+
71
+ .PHONY: checkmessages
72
+ checkmessages: messages
73
+ $(call group,Checking message catalog)
74
+ @./Makefile.tasks.sh check-locale-diff
75
+ @./Makefile.tasks.sh check-fuzzy-translations
76
+ $(call endgroup)
77
+
78
+ tests ?= tests
79
+ .PHONY: unittests
80
+ unittests:
81
+ $(call group,Running unit tests)
82
+ # Run unit tests with coverage
83
+ coverage run runtests.py $(tests) --shuffle
84
+ $(call endgroup)
85
+
86
+ .PHONY: coveragetest
87
+ coveragetest: unittests
88
+ # Generate coverage report
89
+ ifneq ($(GITHUB_ACTIONS),true)
90
+ coverage report
91
+ else
92
+ @echo "### Package coverage" >> ${GITHUB_STEP_SUMMARY}
93
+ @echo '```' >> ${GITHUB_STEP_SUMMARY}
94
+ coverage report >> ${GITHUB_STEP_SUMMARY}
95
+ @echo '```' >> ${GITHUB_STEP_SUMMARY}
96
+ endif
97
+
98
+ .PHONY: coverage
99
+ coverage: unittests
100
+ # Generate test coverage html report
101
+ coverage html
102
+ @echo "Coverage report is located at ../../var/htmlcov/index.html"
103
+
104
+ .PHONY: django-checks
105
+ django-checks:
106
+ # Run Django system checks
107
+ $(call group,Running Django system checks)
108
+ python manage.py check --fail-level WARNING
109
+ $(call endgroup)
110
+
111
+ .PHONY: checkmanifest
112
+ checkmanifest:
113
+ # Check if all files are included in the sdist
114
+ $(call group,Checking manifest)
115
+ check-manifest
116
+ $(call endgroup)
117
+
118
+ .PHONY: checksetup
119
+ checksetup: build
120
+ # Check metadata
121
+ $(call group,Checking package metadata)
122
+ twine check ../../var/dist/*.whl
123
+ $(call endgroup)
124
+
125
+ .PHONY: build
126
+ build: clean compilemessages
127
+ # Build the package
128
+ $(call group,Building package)
129
+ python -m build --installer uv --outdir ../../var/dist
130
+ $(call endgroup)
131
+
132
+ .PHONY: clean
133
+ clean:
134
+ # Clean up build files
135
+ $(call group,Cleaning up)
136
+ rm -rf ../../var/dist/*.whl ../../var/dist/*.tar.gz
137
+ $(call endgroup)
138
+
139
+ ##
140
+ # This target is used by GitHub actions
141
+ ##
142
+
143
+ ../../var/requirements_frozen.txt:
144
+ uv pip compile pyproject.toml --extra oidc_provider -q -o "${@}" --no-annotate --no-header
145
+ @echo "### Package dependencies :package:" >> ${GITHUB_STEP_SUMMARY}
146
+ @echo '```' >> ${GITHUB_STEP_SUMMARY}
147
+ @cat "${@}" >> ${GITHUB_STEP_SUMMARY}
148
+ @echo '```' >> ${GITHUB_STEP_SUMMARY}
149
+
150
+ .PHONY: install-requirements
151
+ install-requirements: ../../var/requirements_frozen.txt
152
+ $(call group,Installing dependencies)
153
+ uv pip install -r '../../var/requirements_frozen.txt' -r requirements_local.txt
154
+ $(call endgroup)
155
+
156
+ .PHONY: post-install
157
+ post-install:
158
+ $(call group,Additional setup)
159
+ openssl genrsa -out '../../var/oidc.key' 4096
160
+ echo "*:*:*:postgres:postgres" > "$${HOME}/.pgpass"
161
+ chmod 600 "$${HOME}/.pgpass"
162
+ $(call endgroup)
163
+
164
+ .PHONY: install-pipeline
165
+ install-pipeline: install-requirements post-install
@@ -0,0 +1,93 @@
1
+ #!/bin/bash
2
+ ##
3
+ # A helper script for complex Makefile tasks.
4
+ ##
5
+
6
+ # Unofficial Bash Strict Mode
7
+ set -euo pipefail
8
+
9
+ # Determine if we're in GitHub Actions
10
+ IS_GITHUB_ACTIONS=${GITHUB_ACTIONS:-false}
11
+
12
+ # Utility: Escape newlines for GitHub Actions output
13
+ escape_newlines() {
14
+ # Replace newlines with %0A in order to preserve them in GitHub Actions output
15
+ awk '{printf "%s%%0A", $0}'
16
+ }
17
+
18
+ # Utility: Output a GitHub workflow error command
19
+ github_error() {
20
+ local file=${1}
21
+ local title=${2}
22
+ local escaped_message
23
+ escaped_message=$(echo "${3}" | escape_newlines)
24
+ echo "::error file=${file},title=${title}::${escaped_message}"
25
+ }
26
+
27
+ # Task: Check if locale files are up-to-date
28
+ check_locale_diff() {
29
+ local diff_files
30
+ local repo_root
31
+ # Find files with differences
32
+ diff_files=$(git -P diff --name-only -- hidp/locale)
33
+ if [ -n "${diff_files}" ]; then
34
+ repo_root=$(git rev-parse --show-toplevel)
35
+ for file in ${diff_files}; do
36
+ # Get the full path of the file
37
+ filepath="${repo_root}/${file}"
38
+ # Get the diff output for this specific file
39
+ diff_output=$(git diff -- "${filepath}")
40
+ # Make sure the diff output is not empty
41
+ if [ -z "${diff_output}" ]; then continue; fi
42
+ if [[ "${IS_GITHUB_ACTIONS}" == "true" ]]; then
43
+ # Annotate the file with the diff output
44
+ github_error "$filepath" "Message catalog is out of date" "${diff_output}"
45
+ else
46
+ echo "Message catalog is out of date for ${file}:"
47
+ echo "${diff_output}"
48
+ fi
49
+ done
50
+ return 1
51
+ fi
52
+ return 0
53
+ }
54
+
55
+ # Task: Check for fuzzy translations
56
+ check_fuzzy_translations() {
57
+ local grep_files
58
+ # Find files with fuzzy translation markers
59
+ # Ignore the exit code 1 (no matches) from grep so the script doesn't exit prematurely
60
+ grep_files=$(grep -rl '#, fuzzy\n\| msgid' hidp/locale/ || test $? = 1)
61
+ if [ -n "${grep_files}" ]; then
62
+ for file in ${grep_files}; do
63
+ # Get the matching lines for this specific file (including context around the match)
64
+ grep_output=$(grep -C1 '#, fuzzy\n\| msgid' "${file}")
65
+ if [[ "${IS_GITHUB_ACTIONS}" == "true" ]]; then
66
+ # Annotate the file with the grep output
67
+ filepath=$(readlink -f "$file")
68
+ github_error "$filepath" "Fuzzy translation(s) found" "$grep_output"
69
+ else
70
+ echo "Fuzzy translation(s) found in $file:"
71
+ echo "$grep_output"
72
+ fi
73
+ done
74
+ return 1
75
+ fi
76
+ return 0
77
+ }
78
+
79
+ # Dispatch to the appropriate task based on the first argument
80
+ case "${1:-help}" in
81
+ check-locale-diff)
82
+ check_locale_diff
83
+ exit $? # Exit with the status check_locale_diff returned
84
+ ;;
85
+ check-fuzzy-translations)
86
+ check_fuzzy_translations
87
+ exit $? # Exit with the status check_fuzzy_translations returned
88
+ ;;
89
+ *)
90
+ echo "Usage: $0 {check-locale-diff|check-fuzzy-translations}"
91
+ exit 1
92
+ ;;
93
+ esac
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-hidp
3
+ Version: 1.4.0rc3
4
+ Author-email: Jaap Roes <jroes@leukeleu.nl>, Dennis Bunskoek <dbunskoek@leukeleu.nl>, Ramon de Jezus <rdejezus@leukeleu.nl>, Thomas Kalverda <tkalverda@leukeleu.nl>, Wouter de Vries <wdevries@leukeleu.nl>
5
+ License-Expression: BSD-3-Clause
6
+ Project-URL: Documentation, https://leukeleu.github.io/django-hidp/
7
+ Project-URL: Repository, https://github.com/leukeleu/django-hidp/
8
+ Project-URL: Issues, https://github.com/leukeleu/django-hidp/issues
9
+ Project-URL: Releasenotes, https://github.com/leukeleu/django-hidp/releases
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Framework :: Django
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: Django<6,>=4.2
17
+ Requires-Dist: django-ratelimit<5,>=4.1.0
18
+ Requires-Dist: jwcrypto<2,>=1.5
19
+ Requires-Dist: requests<3,>=2.32
20
+ Provides-Extra: oidc-provider
21
+ Requires-Dist: django-oauth-toolkit<3.1,>=3.0.1; extra == "oidc-provider"
22
+ Requires-Dist: djangorestframework<3.16,>=3.15.2; extra == "oidc-provider"
23
+ Provides-Extra: otp
24
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "otp"
25
+ Requires-Dist: segno<2,>=1.3.0; extra == "otp"
26
+ Provides-Extra: recommended
27
+ Requires-Dist: Django<6,>=4.2; extra == "recommended"
28
+ Requires-Dist: django-ratelimit<5,>=4.1.0; extra == "recommended"
29
+ Requires-Dist: jwcrypto<2,>=1.5; extra == "recommended"
30
+ Requires-Dist: requests<3,>=2.32; extra == "recommended"
31
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "recommended"
32
+ Requires-Dist: segno<2,>=1.3.0; extra == "recommended"
33
+ Provides-Extra: all
34
+ Requires-Dist: Django<6,>=4.2; extra == "all"
35
+ Requires-Dist: django-ratelimit<5,>=4.1.0; extra == "all"
36
+ Requires-Dist: jwcrypto<2,>=1.5; extra == "all"
37
+ Requires-Dist: requests<3,>=2.32; extra == "all"
38
+ Requires-Dist: django-oauth-toolkit<3.1,>=3.0.1; extra == "all"
39
+ Requires-Dist: djangorestframework<3.16,>=3.15.2; extra == "all"
40
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "all"
41
+ Requires-Dist: segno<2,>=1.3.0; extra == "all"
42
+
43
+ # Hello, ID Please
44
+
45
+ "Hello, ID Please" (HIdP) is a Django application that offers a
46
+ full-featured authentication system for Django projects. It is designed with
47
+ the OWASP best practices in mind and offers a secure and flexible solution for
48
+ registering and authenticating users in Django projects.
49
+
50
+ Please read the full documentation on https://leukeleu.github.io/django-hidp/
@@ -0,0 +1,8 @@
1
+ # Hello, ID Please
2
+
3
+ "Hello, ID Please" (HIdP) is a Django application that offers a
4
+ full-featured authentication system for Django projects. It is designed with
5
+ the OWASP best practices in mind and offers a secure and flexible solution for
6
+ registering and authenticating users in Django projects.
7
+
8
+ Please read the full documentation on https://leukeleu.github.io/django-hidp/
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-hidp
3
+ Version: 1.4.0rc3
4
+ Author-email: Jaap Roes <jroes@leukeleu.nl>, Dennis Bunskoek <dbunskoek@leukeleu.nl>, Ramon de Jezus <rdejezus@leukeleu.nl>, Thomas Kalverda <tkalverda@leukeleu.nl>, Wouter de Vries <wdevries@leukeleu.nl>
5
+ License-Expression: BSD-3-Clause
6
+ Project-URL: Documentation, https://leukeleu.github.io/django-hidp/
7
+ Project-URL: Repository, https://github.com/leukeleu/django-hidp/
8
+ Project-URL: Issues, https://github.com/leukeleu/django-hidp/issues
9
+ Project-URL: Releasenotes, https://github.com/leukeleu/django-hidp/releases
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Framework :: Django
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: Django<6,>=4.2
17
+ Requires-Dist: django-ratelimit<5,>=4.1.0
18
+ Requires-Dist: jwcrypto<2,>=1.5
19
+ Requires-Dist: requests<3,>=2.32
20
+ Provides-Extra: oidc-provider
21
+ Requires-Dist: django-oauth-toolkit<3.1,>=3.0.1; extra == "oidc-provider"
22
+ Requires-Dist: djangorestframework<3.16,>=3.15.2; extra == "oidc-provider"
23
+ Provides-Extra: otp
24
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "otp"
25
+ Requires-Dist: segno<2,>=1.3.0; extra == "otp"
26
+ Provides-Extra: recommended
27
+ Requires-Dist: Django<6,>=4.2; extra == "recommended"
28
+ Requires-Dist: django-ratelimit<5,>=4.1.0; extra == "recommended"
29
+ Requires-Dist: jwcrypto<2,>=1.5; extra == "recommended"
30
+ Requires-Dist: requests<3,>=2.32; extra == "recommended"
31
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "recommended"
32
+ Requires-Dist: segno<2,>=1.3.0; extra == "recommended"
33
+ Provides-Extra: all
34
+ Requires-Dist: Django<6,>=4.2; extra == "all"
35
+ Requires-Dist: django-ratelimit<5,>=4.1.0; extra == "all"
36
+ Requires-Dist: jwcrypto<2,>=1.5; extra == "all"
37
+ Requires-Dist: requests<3,>=2.32; extra == "all"
38
+ Requires-Dist: django-oauth-toolkit<3.1,>=3.0.1; extra == "all"
39
+ Requires-Dist: djangorestframework<3.16,>=3.15.2; extra == "all"
40
+ Requires-Dist: django-otp<2,>=1.5.0; extra == "all"
41
+ Requires-Dist: segno<2,>=1.3.0; extra == "all"
42
+
43
+ # Hello, ID Please
44
+
45
+ "Hello, ID Please" (HIdP) is a Django application that offers a
46
+ full-featured authentication system for Django projects. It is designed with
47
+ the OWASP best practices in mind and offers a secure and flexible solution for
48
+ registering and authenticating users in Django projects.
49
+
50
+ Please read the full documentation on https://leukeleu.github.io/django-hidp/