passphera-core 0.9.1__tar.gz → 0.10.0__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.
- {passphera-core-0.9.1 → passphera_core-0.10.0}/PKG-INFO +11 -2
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/application/user.py +1 -1
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/entities.py +8 -4
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/interfaces.py +0 -12
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core.egg-info/PKG-INFO +11 -2
- {passphera-core-0.9.1 → passphera_core-0.10.0}/setup.py +1 -1
- {passphera-core-0.9.1 → passphera_core-0.10.0}/README.md +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/__init__.py +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/application/__init__.py +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/application/generator.py +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/application/password.py +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core/exceptions.py +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core.egg-info/SOURCES.txt +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core.egg-info/dependency_links.txt +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core.egg-info/requires.txt +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/passphera_core.egg-info/top_level.txt +0 -0
- {passphera-core-0.9.1 → passphera_core-0.10.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: passphera-core
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.10.0
|
4
4
|
Summary: The core system of passphera project
|
5
5
|
Home-page: https://github.com/passphera/core
|
6
6
|
Author: Fathi Abdelmalek
|
@@ -15,6 +15,15 @@ Classifier: Topic :: Security :: Cryptography
|
|
15
15
|
Requires-Python: >=3
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
Requires-Dist: cipherspy
|
18
|
+
Dynamic: author
|
19
|
+
Dynamic: author-email
|
20
|
+
Dynamic: classifier
|
21
|
+
Dynamic: description
|
22
|
+
Dynamic: description-content-type
|
23
|
+
Dynamic: home-page
|
24
|
+
Dynamic: requires-dist
|
25
|
+
Dynamic: requires-python
|
26
|
+
Dynamic: summary
|
18
27
|
|
19
28
|
# passphera-core
|
20
29
|
|
@@ -18,7 +18,7 @@ class RegisterUserUseCase:
|
|
18
18
|
user_entity: User = User(**user.__dict__)
|
19
19
|
generator_entity: Generator = Generator(user_id=user_entity.id)
|
20
20
|
self.generator_repository.save(generator_entity)
|
21
|
-
user_entity.
|
21
|
+
user_entity.generator_id = generator_entity.id
|
22
22
|
self.user_repository.save(user_entity)
|
23
23
|
return user_entity
|
24
24
|
|
@@ -84,7 +84,11 @@ class Generator:
|
|
84
84
|
user_id: UUID = field(default_factory=uuid4)
|
85
85
|
created_at: datetime = field(default_factory=datetime.now)
|
86
86
|
updated_at: datetime = field(default_factory=datetime.now)
|
87
|
+
config_id: UUID = field(default_factory=UUID)
|
87
88
|
config: GeneratorConfig = field(default_factory=GeneratorConfig)
|
89
|
+
|
90
|
+
def __post_init__(self):
|
91
|
+
self.config = GeneratorConfig(generator_id=self.id)
|
88
92
|
|
89
93
|
def apply_replacements(self, password: str) -> str:
|
90
94
|
"""
|
@@ -115,11 +119,11 @@ class User:
|
|
115
119
|
username: str = field(default_factory=str)
|
116
120
|
email: str = field(default_factory=str)
|
117
121
|
password: str = field(default_factory=str)
|
118
|
-
|
119
|
-
|
122
|
+
generator_id: UUID = field(default_factory=UUID)
|
123
|
+
passwords_ids: list[UUID] = field(default_factory=list[UUID])
|
120
124
|
|
121
125
|
def add_password(self, password_id: UUID) -> None:
|
122
|
-
self.
|
126
|
+
self.passwords_ids.append(password_id)
|
123
127
|
|
124
128
|
def delete_password(self, password_id: UUID) -> None:
|
125
|
-
self.
|
129
|
+
self.passwords_ids.remove(password_id)
|
@@ -31,10 +31,6 @@ class GeneratorRepository(ABC):
|
|
31
31
|
def update(self, generator: Generator) -> None:
|
32
32
|
pass
|
33
33
|
|
34
|
-
@abstractmethod
|
35
|
-
def delete(self, generator_id: UUID) -> None:
|
36
|
-
pass
|
37
|
-
|
38
34
|
@abstractmethod
|
39
35
|
def find_by_id(self, generator_id: UUID) -> Generator:
|
40
36
|
pass
|
@@ -53,10 +49,6 @@ class GeneratorConfigRepository(ABC):
|
|
53
49
|
def update(self, generator_config: GeneratorConfig) -> None:
|
54
50
|
pass
|
55
51
|
|
56
|
-
@abstractmethod
|
57
|
-
def delete(self, generator_config_id: UUID) -> None:
|
58
|
-
pass
|
59
|
-
|
60
52
|
@abstractmethod
|
61
53
|
def find_by_id(self, generator_config_id: UUID) -> GeneratorConfig:
|
62
54
|
pass
|
@@ -75,10 +67,6 @@ class UserRepository(ABC):
|
|
75
67
|
def update(self, user: User) -> None:
|
76
68
|
pass
|
77
69
|
|
78
|
-
@abstractmethod
|
79
|
-
def delete(self, user_id: UUID) -> None:
|
80
|
-
pass
|
81
|
-
|
82
70
|
@abstractmethod
|
83
71
|
def find_by_id(self, user_id: UUID) -> User:
|
84
72
|
pass
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: passphera-core
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.10.0
|
4
4
|
Summary: The core system of passphera project
|
5
5
|
Home-page: https://github.com/passphera/core
|
6
6
|
Author: Fathi Abdelmalek
|
@@ -15,6 +15,15 @@ Classifier: Topic :: Security :: Cryptography
|
|
15
15
|
Requires-Python: >=3
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
Requires-Dist: cipherspy
|
18
|
+
Dynamic: author
|
19
|
+
Dynamic: author-email
|
20
|
+
Dynamic: classifier
|
21
|
+
Dynamic: description
|
22
|
+
Dynamic: description-content-type
|
23
|
+
Dynamic: home-page
|
24
|
+
Dynamic: requires-dist
|
25
|
+
Dynamic: requires-python
|
26
|
+
Dynamic: summary
|
18
27
|
|
19
28
|
# passphera-core
|
20
29
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|