dataflow-core 2.0.0__py3-none-any.whl → 2.0.2__py3-none-any.whl
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.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- authenticator/__init__.py +0 -0
- authenticator/dataflowairflowauthenticator.py +0 -0
- authenticator/dataflowhubauthenticator.py +21 -14
- authenticator/dataflowsupersetauthenticator.py +0 -0
- authenticator/package/__init__.py +0 -0
- authenticator/package/configuration.py +0 -0
- authenticator/package/models/__init__.py +0 -0
- authenticator/package/models/database.py +0 -0
- authenticator/package/models/session.py +0 -0
- authenticator/package/models/user.py +0 -0
- dataflow/__init__.py +0 -0
- dataflow/configuration.py +0 -0
- dataflow/dataflow.py +0 -0
- dataflow/models/__init__.py +0 -0
- dataflow/models/database.py +0 -0
- dataflow/models/session.py +0 -0
- dataflow/models/user.py +0 -0
- dataflow/utils/__init__.py +0 -0
- dataflow/utils/aws_secrets_manager.py +0 -0
- {dataflow_core-2.0.0.dist-info → dataflow_core-2.0.2.dist-info}/METADATA +8 -2
- {dataflow_core-2.0.0.dist-info → dataflow_core-2.0.2.dist-info}/RECORD +6 -6
- {dataflow_core-2.0.0.dist-info → dataflow_core-2.0.2.dist-info}/WHEEL +1 -1
- {dataflow_core-2.0.0.dist-info → dataflow_core-2.0.2.dist-info}/entry_points.txt +1 -0
- {dataflow_core-2.0.0.dist-info → dataflow_core-2.0.2.dist-info}/top_level.txt +0 -0
authenticator/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ from .package.models import (
|
|
|
4
4
|
user as m_user,
|
|
5
5
|
session as m_session
|
|
6
6
|
)
|
|
7
|
-
|
|
7
|
+
from datetime import datetime, timedelta, timezone
|
|
8
8
|
import uuid
|
|
9
9
|
from jupyterhub.auth import Authenticator
|
|
10
10
|
|
|
@@ -34,17 +34,26 @@ class DataflowHubAuthenticator(Authenticator):
|
|
|
34
34
|
query = self.db.query(m_user.User)
|
|
35
35
|
user = query.filter(m_user.User.user_name == username).first()
|
|
36
36
|
|
|
37
|
-
if user is
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
if user is None or user.password != password:
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
# Check if the user already has an existing session
|
|
41
|
+
existing_session = (
|
|
42
|
+
self.db.query(m_session.Session_table)
|
|
43
|
+
.filter(m_session.Session_table.user_id == str(user.user_id))
|
|
44
|
+
.first()
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
if existing_session:
|
|
48
|
+
# Reuse the existing session_id
|
|
49
|
+
session_id = existing_session.session_id
|
|
50
|
+
else:
|
|
51
|
+
# Generate a new session_id
|
|
43
52
|
session_id = self.generate_session_id()
|
|
44
53
|
query = self.db.query(m_session.Session_table)
|
|
45
54
|
isSession = query.filter(m_session.Session_table.session_id == session_id).first()
|
|
46
55
|
|
|
47
|
-
#
|
|
56
|
+
# If session_id(uuid string) already exists in the database, generate a new one
|
|
48
57
|
while isSession is not None:
|
|
49
58
|
session_id = self.generate_session_id()
|
|
50
59
|
isSession = query.filter(m_session.Session_table.session_id == session_id).first()
|
|
@@ -55,12 +64,10 @@ class DataflowHubAuthenticator(Authenticator):
|
|
|
55
64
|
self.db.commit()
|
|
56
65
|
self.db.refresh(db_item)
|
|
57
66
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
else:
|
|
63
|
-
return None
|
|
67
|
+
expires = datetime.now(timezone.utc) + timedelta(days=365)
|
|
68
|
+
handler.set_cookie("dataflow_session", session_id, expires=expires)
|
|
69
|
+
user_dict = {"name": username, "session_id": session_id}
|
|
70
|
+
return user_dict
|
|
64
71
|
|
|
65
72
|
except Exception as e:
|
|
66
73
|
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
dataflow/__init__.py
CHANGED
|
File without changes
|
dataflow/configuration.py
CHANGED
|
File without changes
|
dataflow/dataflow.py
CHANGED
|
File without changes
|
dataflow/models/__init__.py
CHANGED
|
File without changes
|
dataflow/models/database.py
CHANGED
|
File without changes
|
dataflow/models/session.py
CHANGED
|
File without changes
|
dataflow/models/user.py
CHANGED
|
File without changes
|
dataflow/utils/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dataflow-core
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Dataflow core package
|
|
5
|
+
Home-page: UNKNOWN
|
|
5
6
|
Author: Dataflow
|
|
6
|
-
Author-email:
|
|
7
|
+
Author-email: UNKNOWN
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Platform: UNKNOWN
|
|
7
10
|
Requires-Dist: sqlalchemy
|
|
8
11
|
Requires-Dist: boto3
|
|
9
12
|
Requires-Dist: psycopg2-binary
|
|
10
13
|
Requires-Dist: pymysql
|
|
11
14
|
|
|
15
|
+
UNKNOWN
|
|
16
|
+
|
|
17
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
authenticator/__init__.py,sha256=A7EfIoO2e0vyt9TXGHPOeS-THDC0KEiaQHdkdzXUVH8,206
|
|
2
2
|
authenticator/dataflowairflowauthenticator.py,sha256=wzd807UAb5ojIVMO8FVHQnNi3Tc78NjkhbDSfzgo2Qg,4790
|
|
3
|
-
authenticator/dataflowhubauthenticator.py,sha256=
|
|
3
|
+
authenticator/dataflowhubauthenticator.py,sha256=UgjZiXSP-hlbciyJVb-QIgUjS3_EgX0WIvbhD563rVw,2918
|
|
4
4
|
authenticator/dataflowsupersetauthenticator.py,sha256=UNgem68eg8G-1uAok2yVc6NvUeXaJ-9MPmdpfSyr9Jg,2759
|
|
5
5
|
authenticator/package/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
authenticator/package/configuration.py,sha256=7To6XwH1eESiYp39eqPcswXWwrdBUdPF6xN6WnazOF0,663
|
|
@@ -17,8 +17,8 @@ dataflow/models/session.py,sha256=C9crPh6ZDFuL27hZ_zhUXDZZ0ZiIDE8ZD19O_4WPw-I,48
|
|
|
17
17
|
dataflow/models/user.py,sha256=IYogp_vt0yDBG5i936uNPjgTis77VYPzITn9XpQUIyw,788
|
|
18
18
|
dataflow/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
dataflow/utils/aws_secrets_manager.py,sha256=FqHm3YRynv580FpFsS0RfI1MSGY5aq-V7t4blpiYsS4,2588
|
|
20
|
-
dataflow_core-2.0.
|
|
21
|
-
dataflow_core-2.0.
|
|
22
|
-
dataflow_core-2.0.
|
|
23
|
-
dataflow_core-2.0.
|
|
24
|
-
dataflow_core-2.0.
|
|
20
|
+
dataflow_core-2.0.2.dist-info/METADATA,sha256=AoFhbUSzibF-_tP491Gr_baKMXM2tChz1o2QUF0RbvE,293
|
|
21
|
+
dataflow_core-2.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
22
|
+
dataflow_core-2.0.2.dist-info/entry_points.txt,sha256=lDLG2MMWlKfkqsVWFghF7sx-yEvM2xqMmHE7rMTysE4,118
|
|
23
|
+
dataflow_core-2.0.2.dist-info/top_level.txt,sha256=SZsUOpSCK9ntUy-3Tusxzf5A2e8ebwD8vouPb1dPt_8,23
|
|
24
|
+
dataflow_core-2.0.2.dist-info/RECORD,,
|
|
File without changes
|