square-authentication 6.0.3__tar.gz → 6.0.4__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.
- {square_authentication-6.0.3 → square_authentication-6.0.4}/PKG-INFO +5 -1
- {square_authentication-6.0.3 → square_authentication-6.0.4}/README.md +4 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/setup.py +1 -1
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/configuration.py +9 -6
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/data/config.ini +5 -0
- square_authentication-6.0.4/square_authentication/data/config.testing.ini +53 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/PKG-INFO +5 -1
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/SOURCES.txt +1 -0
- square_authentication-6.0.4/tests/test_1.py +10 -0
- square_authentication-6.0.3/tests/test_1.py +0 -17
- {square_authentication-6.0.3 → square_authentication-6.0.4}/setup.cfg +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/__init__.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/main.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/messages.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/pydantic_models/__init__.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/pydantic_models/core.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/__init__.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/core.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/profile.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/utility.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/utils/__init__.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/utils/encryption.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/utils/token.py +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/dependency_links.txt +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/requires.txt +0 -0
- {square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version: 6.0.
|
3
|
+
Version: 6.0.4
|
4
4
|
Summary: authentication layer for my personal server.
|
5
5
|
Home-page: https://github.com/thepmsquare/square_authentication
|
6
6
|
Author: thePmSquare
|
@@ -53,6 +53,10 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v6.0.4
|
57
|
+
|
58
|
+
- mock ini file for pytest.
|
59
|
+
|
56
60
|
### v6.0.3
|
57
61
|
|
58
62
|
- make profile photo upload optional in update_profile_photo/v0, to enable users to remove their profile photo.
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/configuration.py
RENAMED
@@ -7,12 +7,8 @@ from square_file_store_helper import SquareFileStoreHelper
|
|
7
7
|
from square_logger.main import SquareLogger
|
8
8
|
|
9
9
|
try:
|
10
|
-
config_file_path = (
|
11
|
-
os.path.dirname(os.path.abspath(__file__))
|
12
|
-
+ os.sep
|
13
|
-
+ "data"
|
14
|
-
+ os.sep
|
15
|
-
+ "config.ini"
|
10
|
+
config_file_path = os.path.join(
|
11
|
+
os.path.dirname(os.path.abspath(__file__)), "data", "config.ini"
|
16
12
|
)
|
17
13
|
ldict_configuration = ConfigReader(config_file_path).read_configuration()
|
18
14
|
|
@@ -45,6 +41,13 @@ try:
|
|
45
41
|
config_str_ssl_key_file_path = ldict_configuration["ENVIRONMENT"][
|
46
42
|
"SSL_KEY_FILE_PATH"
|
47
43
|
]
|
44
|
+
config_str_db_ip = ldict_configuration["ENVIRONMENT"]["DB_IP"]
|
45
|
+
|
46
|
+
config_int_db_port = int(ldict_configuration["ENVIRONMENT"]["DB_PORT"])
|
47
|
+
|
48
|
+
config_str_db_username = ldict_configuration["ENVIRONMENT"]["DB_USERNAME"]
|
49
|
+
|
50
|
+
config_str_db_password = ldict_configuration["ENVIRONMENT"]["DB_PASSWORD"]
|
48
51
|
# ===========================================
|
49
52
|
|
50
53
|
# ===========================================
|
@@ -0,0 +1,53 @@
|
|
1
|
+
[GENERAL]
|
2
|
+
MODULE_NAME = square_authentication
|
3
|
+
|
4
|
+
[ENVIRONMENT]
|
5
|
+
HOST_IP = 0.0.0.0
|
6
|
+
HOST_PORT = 10011
|
7
|
+
|
8
|
+
LOG_FILE_NAME = square_authentication
|
9
|
+
|
10
|
+
SECRET_KEY_FOR_ACCESS_TOKEN = dummy_access
|
11
|
+
SECRET_KEY_FOR_REFRESH_TOKEN = dummy_refresh
|
12
|
+
|
13
|
+
ACCESS_TOKEN_VALID_MINUTES = 1440
|
14
|
+
REFRESH_TOKEN_VALID_MINUTES = 10080
|
15
|
+
|
16
|
+
# absolute path (mandatory only for http)
|
17
|
+
SSL_CRT_FILE_PATH = ssl.crt
|
18
|
+
SSL_KEY_FILE_PATH = ssl.key
|
19
|
+
|
20
|
+
DB_IP = raspi.thepmsquare.com
|
21
|
+
DB_PORT = 15432
|
22
|
+
DB_USERNAME = postgres
|
23
|
+
DB_PASSWORD = testing_password
|
24
|
+
|
25
|
+
[SQUARE_LOGGER]
|
26
|
+
|
27
|
+
# | Log Level | Value |
|
28
|
+
# | --------- | ----- |
|
29
|
+
# | CRITICAL | 50 |
|
30
|
+
# | ERROR | 40 |
|
31
|
+
# | WARNING | 30 |
|
32
|
+
# | INFO | 20 |
|
33
|
+
# | DEBUG | 10 |
|
34
|
+
# | NOTSET | 0 |
|
35
|
+
|
36
|
+
LOG_LEVEL = 20
|
37
|
+
# absolute or relative path
|
38
|
+
LOG_PATH = logs
|
39
|
+
# number of backup log files to keep during rotation
|
40
|
+
# if backupCount is zero, rollover never occurs.
|
41
|
+
LOG_BACKUP_COUNT = 3
|
42
|
+
|
43
|
+
[SQUARE_DATABASE_HELPER]
|
44
|
+
|
45
|
+
SQUARE_DATABASE_PROTOCOL = http
|
46
|
+
SQUARE_DATABASE_IP = raspi.thepmsquare.com
|
47
|
+
SQUARE_DATABASE_PORT = 20010
|
48
|
+
|
49
|
+
[SQUARE_FILE_STORE_HELPER]
|
50
|
+
|
51
|
+
SQUARE_FILE_STORE_PROTOCOL = http
|
52
|
+
SQUARE_FILE_STORE_IP = raspi.thepmsquare.com
|
53
|
+
SQUARE_FILE_STORE_PORT = 20010
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: square_authentication
|
3
|
-
Version: 6.0.
|
3
|
+
Version: 6.0.4
|
4
4
|
Summary: authentication layer for my personal server.
|
5
5
|
Home-page: https://github.com/thepmsquare/square_authentication
|
6
6
|
Author: thePmSquare
|
@@ -53,6 +53,10 @@ pip install square_authentication
|
|
53
53
|
|
54
54
|
## changelog
|
55
55
|
|
56
|
+
### v6.0.4
|
57
|
+
|
58
|
+
- mock ini file for pytest.
|
59
|
+
|
56
60
|
### v6.0.3
|
57
61
|
|
58
62
|
- make profile photo upload optional in update_profile_photo/v0, to enable users to remove their profile photo.
|
@@ -10,6 +10,7 @@ square_authentication.egg-info/dependency_links.txt
|
|
10
10
|
square_authentication.egg-info/requires.txt
|
11
11
|
square_authentication.egg-info/top_level.txt
|
12
12
|
square_authentication/data/config.ini
|
13
|
+
square_authentication/data/config.testing.ini
|
13
14
|
square_authentication/pydantic_models/__init__.py
|
14
15
|
square_authentication/pydantic_models/core.py
|
15
16
|
square_authentication/routes/__init__.py
|
@@ -0,0 +1,10 @@
|
|
1
|
+
from square_commons import get_api_output_in_standard_format
|
2
|
+
|
3
|
+
|
4
|
+
def test_read_main(get_patched_configuration, create_client_and_cleanup):
|
5
|
+
client = create_client_and_cleanup
|
6
|
+
response = client.get("/")
|
7
|
+
assert response.status_code == 200
|
8
|
+
assert response.json() == get_api_output_in_standard_format(
|
9
|
+
log=get_patched_configuration.config_str_module_name
|
10
|
+
)
|
@@ -1,17 +0,0 @@
|
|
1
|
-
from fastapi.testclient import TestClient
|
2
|
-
from square_commons import get_api_output_in_standard_format
|
3
|
-
|
4
|
-
from square_authentication.configuration import config_str_module_name
|
5
|
-
from square_authentication.main import (
|
6
|
-
app,
|
7
|
-
)
|
8
|
-
|
9
|
-
client = TestClient(app)
|
10
|
-
|
11
|
-
|
12
|
-
def test_read_main():
|
13
|
-
response = client.get("/")
|
14
|
-
assert response.status_code == 200
|
15
|
-
assert response.json() == get_api_output_in_standard_format(
|
16
|
-
log=config_str_module_name
|
17
|
-
)
|
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/messages.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/__init__.py
RENAMED
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/core.py
RENAMED
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/profile.py
RENAMED
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/routes/utility.py
RENAMED
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
{square_authentication-6.0.3 → square_authentication-6.0.4}/square_authentication/utils/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|