aboutsummaryrefslogtreecommitdiffstats
path: root/paste/store.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-03-28 18:57:40 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-03-28 20:10:48 +0100
commit3f1d9361497c4e0803f3dc3ea9cee9d3a4087171 (patch)
treeaee85f3a9858638482389b1a7118e7d4dd0cc863 /paste/store.py
parentd198fca95919cc78275d3d9fa8f1b0a8acfdbab3 (diff)
downloadpaste-3f1d9361497c4e0803f3dc3ea9cee9d3a4087171.tar.gz
paste-3f1d9361497c4e0803f3dc3ea9cee9d3a4087171.tar.xz
paste-3f1d9361497c4e0803f3dc3ea9cee9d3a4087171.zip
Split Store into Store and Auth
This separates the concerns
Diffstat (limited to 'paste/store.py')
-rw-r--r--paste/store.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/paste/store.py b/paste/store.py
index f69c03d..427345b 100644
--- a/paste/store.py
+++ b/paste/store.py
@@ -89,6 +89,11 @@ class Store:
)
return cur.rowcount == 1
+
+class Auth:
+ def __init__(self, conn: Connection):
+ self.conn = conn
+
def generate_token(self):
token = token_bytes(TOKEN_BYTES)
with self.conn: