square-authentication 6.0.4__py3-none-any.whl → 6.0.5__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.
@@ -22,6 +22,9 @@ try:
22
22
  # environment
23
23
  config_str_host_ip = ldict_configuration["ENVIRONMENT"]["HOST_IP"]
24
24
  config_int_host_port = int(ldict_configuration["ENVIRONMENT"]["HOST_PORT"])
25
+ config_list_allow_origins = eval(
26
+ ldict_configuration["ENVIRONMENT"]["ALLOW_ORIGINS"]
27
+ )
25
28
  config_str_log_file_name = ldict_configuration["ENVIRONMENT"]["LOG_FILE_NAME"]
26
29
  config_str_secret_key_for_access_token = ldict_configuration["ENVIRONMENT"][
27
30
  "SECRET_KEY_FOR_ACCESS_TOKEN"
@@ -4,6 +4,7 @@ MODULE_NAME = square_authentication
4
4
  [ENVIRONMENT]
5
5
  HOST_IP = 0.0.0.0
6
6
  HOST_PORT = 10011
7
+ ALLOW_ORIGINS = ["http://localhost:10011"]
7
8
 
8
9
  LOG_FILE_NAME = square_authentication
9
10
 
@@ -4,6 +4,7 @@ MODULE_NAME = square_authentication
4
4
  [ENVIRONMENT]
5
5
  HOST_IP = 0.0.0.0
6
6
  HOST_PORT = 10011
7
+ ALLOW_ORIGINS = ["http://localhost:10011"]
7
8
 
8
9
  LOG_FILE_NAME = square_authentication
9
10
 
@@ -13,6 +13,7 @@ from square_authentication.configuration import (
13
13
  config_str_module_name,
14
14
  config_str_ssl_key_file_path,
15
15
  config_str_ssl_crt_file_path,
16
+ config_list_allow_origins,
16
17
  )
17
18
  from square_authentication.routes import core, utility, profile
18
19
 
@@ -21,7 +22,7 @@ app = FastAPI()
21
22
  app.add_middleware(
22
23
  CORSMiddleware,
23
24
  allow_credentials=True,
24
- allow_origins=["*"],
25
+ allow_origins=config_list_allow_origins,
25
26
  allow_methods=["*"],
26
27
  allow_headers=["*"],
27
28
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: square_authentication
3
- Version: 6.0.4
3
+ Version: 6.0.5
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,11 @@ pip install square_authentication
53
53
 
54
54
  ## changelog
55
55
 
56
+ ### v6.0.5
57
+
58
+ - env
59
+ - add ALLOW_ORIGINS
60
+
56
61
  ### v6.0.4
57
62
 
58
63
  - mock ini file for pytest.
@@ -1,9 +1,9 @@
1
1
  square_authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- square_authentication/configuration.py,sha256=o-fx1zLipECyEQQm7jtMR2hYBW3gZ6uyFojSzuJ7Pqs,4475
3
- square_authentication/main.py,sha256=zADc2vmV8yDylmbihj4FzLDEs5b-9nItFoB5c4AoKGk,1704
2
+ square_authentication/configuration.py,sha256=zdlBY7xyMoEl8fc2whpXqsILvvrNnFGC1Yry_pB6FaI,4579
3
+ square_authentication/main.py,sha256=nhkv8U4E9b7VIH7Aaj8iMWIwA4VIL-vzRXjZaYEFWPw,1755
4
4
  square_authentication/messages.py,sha256=vhcl4bw8Ar1npiErjGh3kkNPmW1rmDRtf6rKn5JF8W8,1364
5
- square_authentication/data/config.ini,sha256=mJUGsEMqpAOVrHW3KmiZzH92340DkX69wDG4jBv1YWw,1111
6
- square_authentication/data/config.testing.ini,sha256=wW727RRUgQl4euKJ17uLqlVJTrQ6ISER_9GA5GgW83o,1158
5
+ square_authentication/data/config.ini,sha256=Mayh9AhTBZd8i08Y--ClZuDEjJjfvnfKQmtqablzXOA,1154
6
+ square_authentication/data/config.testing.ini,sha256=KB4PMPZ6a9yJGPXYJWwKlYcNET1Au3TQdJHQyngbZUA,1201
7
7
  square_authentication/pydantic_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  square_authentication/pydantic_models/core.py,sha256=qeNETcJv7mnRKGhATOW2bg0NlHuyzvot1dZ1b1qqhwU,610
9
9
  square_authentication/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -13,7 +13,7 @@ square_authentication/routes/utility.py,sha256=KDr8KdkT0jAGPjfP-b5XXYG7p49WU7J1F
13
13
  square_authentication/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
14
14
  square_authentication/utils/encryption.py,sha256=WakaiEAgWpTJltxBzqOtv81_DCDKfzJqt60fWSPoNvo,2027
15
15
  square_authentication/utils/token.py,sha256=t-RPBY4cYyT1ro3lkLBTOy2BeRGBfluBVBivL5DLmDg,680
16
- square_authentication-6.0.4.dist-info/METADATA,sha256=xvcPTkLQ-Z-DREOI_0tmIlwsu-vXuT8skKTfQ8vJKBA,5158
17
- square_authentication-6.0.4.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
18
- square_authentication-6.0.4.dist-info/top_level.txt,sha256=wDssVJIl9KIEJPj5rR3rv4uRI7yCndMBrvHd_6BGXQA,22
19
- square_authentication-6.0.4.dist-info/RECORD,,
16
+ square_authentication-6.0.5.dist-info/METADATA,sha256=GNI8JWUi_O-UX_T765M_ir8VDFHdmjcBewY-xdfz9Bw,5201
17
+ square_authentication-6.0.5.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
18
+ square_authentication-6.0.5.dist-info/top_level.txt,sha256=wDssVJIl9KIEJPj5rR3rv4uRI7yCndMBrvHd_6BGXQA,22
19
+ square_authentication-6.0.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5