summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-07-19 17:27:01 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-07-23 23:08:47 +0200
commitb95b34d6a34e14ad42e47794a60e7e0f70eb0cdb (patch)
treeb79c5fd070922bb081214e2e747a049f87fd0eb4
parente332dfab614abfbc241091a723bf6354e2b5e920 (diff)
downloadguix-b95b34d6a34e14ad42e47794a60e7e0f70eb0cdb.tar.gz
gnu: Add python-fastapi-csrf-protect.
* gnu/packages/python-web.scm (python-fastapi-csrf-protect): New variable.
-rw-r--r--gnu/packages/python-web.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 6f855a503b..339ac00a23 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -8539,6 +8539,35 @@ starlette.")
      (modify-inputs (package-propagated-inputs python-fastapi)
        (replace "python-starlette" python-starlette-for-fastapi-0.88)))))
 
+(define-public python-fastapi-csrf-protect
+  (package
+    (name "python-fastapi-csrf-protect")
+    (version "0.3.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/aekasitt/fastapi-csrf-protect")
+                    ;; This commit corresponds to version 0.3.1
+                    (commit "536acd651d0d3f9862a0b753ba64dd2d187f8655")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1zlwa0fplmcihylyvakskwkbkl2cq291fmys5x6wrpfdbjrqbgbj"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs
+     (list python-fastapi python-itsdangerous
+           python-pydantic))
+    (native-inputs
+     (list python-poetry-core
+           python-pytest))
+    (home-page "https://github.com/aekasitt/fastapi-csrf-protect")
+    (synopsis "Cross-Site Request Forgery (XSRF) protection")
+    (description
+     "This package provides a stateless implementation of @dfn{Cross-Site
+Request Forgery} (XSRF) Protection by using the Double Submit Cookie mitigation
+pattern.")
+    (license license:expat)))
+
 (define-public python-pyactiveresource
   (package
     (name "python-pyactiveresource")