nlbone 0.7.18__py3-none-any.whl → 0.7.20__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.
@@ -35,7 +35,7 @@ class AuthService(BaseAuthService):
35
35
  return None
36
36
 
37
37
  def get_client_token(self) -> dict | None:
38
- url = f"{self._base_url}/introspect"
38
+ url = f"{self._base_url}/token"
39
39
  result = self._client.post(url, data={
40
40
  "client_id": self.client_id,
41
41
  "client_secret": self.client_secret,
@@ -52,7 +52,7 @@ class AuthService(BaseAuthService):
52
52
  data = self.verify_token(token)
53
53
  if not data:
54
54
  return False
55
- has_access = [perm in data.get("allowed_permissions", []) for perm in permissions]
55
+ has_access = [self.client_id + "#" + perm in data.get("allowed_permissions", []) for perm in permissions]
56
56
  return all(has_access)
57
57
 
58
58
  def get_permissions(self, token: str) -> list[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nlbone
3
- Version: 0.7.18
3
+ Version: 0.7.20
4
4
  Summary: Backbone package for interfaces and infrastructure in Python projects
5
5
  Author-email: Amir Hosein Kahkbazzadeh <a.khakbazzadeh@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ nlbone/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  nlbone/adapters/__init__.py,sha256=NzUmk4XPyp3GJOw7VSE86xkQMZLtG3MrOoXLeoB551M,41
5
5
  nlbone/adapters/snowflake.py,sha256=lmq7vi6HdX9hEuTW6BlTEAy91wmrA4Bx3tvGoagHTW4,2315
6
6
  nlbone/adapters/auth/__init__.py,sha256=hkDHvsFhw_UiOHG9ZSMqjiAhK4wumEforitveSZswVw,42
7
- nlbone/adapters/auth/auth_service.py,sha256=kwHyp2trsXeToyE5pb2CBLfyFLjwR_E8CsGgrOlrPT8,2090
7
+ nlbone/adapters/auth/auth_service.py,sha256=p1Yax036xd7uoppptaoDd4m2qPvKJtqrrP5PYwFZ7OY,2108
8
8
  nlbone/adapters/auth/keycloak.py,sha256=IhEriaFl5mjIGT6ZUCU9qROd678ARchvWgd4UJ6zH7s,4925
9
9
  nlbone/adapters/auth/token_provider.py,sha256=EcZ7nSXxPZJZGaWnyo3QDvrEbGdeXXWnhHnP1-kMniY,1438
10
10
  nlbone/adapters/cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -108,8 +108,8 @@ nlbone/utils/http.py,sha256=MPDEyaC16AKsL0YH6sWCPp8NC2TgzEHpWERYK5HcaYQ,1001
108
108
  nlbone/utils/normalize_mobile.py,sha256=sGH4tV9gX-6eVKozviNWJhm1DN1J28Nj-ERldCYkS_E,732
109
109
  nlbone/utils/redactor.py,sha256=-V4HrHmHwPi3Kez587Ek1uJlgK35qGSrwBOvcbw8Jas,1279
110
110
  nlbone/utils/time.py,sha256=DjjyQ9GLsfXoT6NK8RDW2rOlJg3e6sF04Jw6PBUrSvg,1268
111
- nlbone-0.7.18.dist-info/METADATA,sha256=-H7daItdYK-bK12_qf6TWGOSJIXJQvGMkrKxH-5bQzI,2295
112
- nlbone-0.7.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
113
- nlbone-0.7.18.dist-info/entry_points.txt,sha256=CpIL45t5nbhl1dGQPhfIIDfqqak3teK0SxPGBBr7YCk,59
114
- nlbone-0.7.18.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
- nlbone-0.7.18.dist-info/RECORD,,
111
+ nlbone-0.7.20.dist-info/METADATA,sha256=UYuoC21uJ6Hj_E-3jIGLgGNxhByRv6TrquxUabnZ7uM,2295
112
+ nlbone-0.7.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
113
+ nlbone-0.7.20.dist-info/entry_points.txt,sha256=CpIL45t5nbhl1dGQPhfIIDfqqak3teK0SxPGBBr7YCk,59
114
+ nlbone-0.7.20.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
+ nlbone-0.7.20.dist-info/RECORD,,