scim2-client 0.4.1__py3-none-any.whl → 0.4.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.
- scim2_client/client.py +49 -19
- {scim2_client-0.4.1.dist-info → scim2_client-0.4.2.dist-info}/METADATA +1 -1
- {scim2_client-0.4.1.dist-info → scim2_client-0.4.2.dist-info}/RECORD +5 -5
- {scim2_client-0.4.1.dist-info → scim2_client-0.4.2.dist-info}/WHEEL +0 -0
- {scim2_client-0.4.1.dist-info → scim2_client-0.4.2.dist-info}/licenses/LICENSE.md +0 -0
scim2_client/client.py
CHANGED
|
@@ -798,14 +798,25 @@ class BaseSyncSCIMClient(SCIMClient):
|
|
|
798
798
|
"""
|
|
799
799
|
raise NotImplementedError()
|
|
800
800
|
|
|
801
|
-
def discover(self):
|
|
802
|
-
"""Dynamically discover the server
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
801
|
+
def discover(self, schemas=True, resource_types=True, service_provider_config=True):
|
|
802
|
+
"""Dynamically discover the server configuration objects.
|
|
803
|
+
|
|
804
|
+
:param schemas: Whether to discover the :class:`~scim2_models.Schema` endpoint.
|
|
805
|
+
:param resource_types: Whether to discover the :class:`~scim2_models.ResourceType` endpoint.
|
|
806
|
+
:param service_provider_config: Whether to discover the :class:`~scim2_models.ServiceProviderConfig` endpoint.
|
|
807
|
+
"""
|
|
808
|
+
if resource_types:
|
|
809
|
+
resource_types_response = self.query(ResourceType)
|
|
810
|
+
self.resource_types = resource_types_response.resources
|
|
811
|
+
|
|
812
|
+
if schemas:
|
|
813
|
+
schemas_response = self.query(Schema)
|
|
814
|
+
self.resource_models = self.build_resource_models(
|
|
815
|
+
self.resource_types, schemas_response.resources
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
if service_provider_config:
|
|
819
|
+
self.service_provider_config = self.query(ServiceProviderConfig)
|
|
809
820
|
|
|
810
821
|
|
|
811
822
|
class BaseAsyncSCIMClient(SCIMClient):
|
|
@@ -1064,14 +1075,33 @@ class BaseAsyncSCIMClient(SCIMClient):
|
|
|
1064
1075
|
"""
|
|
1065
1076
|
raise NotImplementedError()
|
|
1066
1077
|
|
|
1067
|
-
async def discover(
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
schemas
|
|
1077
|
-
|
|
1078
|
+
async def discover(
|
|
1079
|
+
self, schemas=True, resource_types=True, service_provider_config=True
|
|
1080
|
+
):
|
|
1081
|
+
"""Dynamically discover the server configuration objects.
|
|
1082
|
+
|
|
1083
|
+
:param schemas: Whether to discover the :class:`~scim2_models.Schema` endpoint.
|
|
1084
|
+
:param resource_types: Whether to discover the :class:`~scim2_models.ResourceType` endpoint.
|
|
1085
|
+
:param service_provider_config: Whether to discover the :class:`~scim2_models.ServiceProviderConfig` endpoint.
|
|
1086
|
+
"""
|
|
1087
|
+
if schemas:
|
|
1088
|
+
schemas_task = asyncio.create_task(self.query(Schema))
|
|
1089
|
+
|
|
1090
|
+
if resource_types:
|
|
1091
|
+
resources_types_task = asyncio.create_task(self.query(ResourceType))
|
|
1092
|
+
|
|
1093
|
+
if service_provider_config:
|
|
1094
|
+
spc_task = asyncio.create_task(self.query(ServiceProviderConfig))
|
|
1095
|
+
|
|
1096
|
+
if resource_types:
|
|
1097
|
+
resource_types_response = await resources_types_task
|
|
1098
|
+
self.resource_types = resource_types_response.resources
|
|
1099
|
+
|
|
1100
|
+
if schemas:
|
|
1101
|
+
schemas_response = await schemas_task
|
|
1102
|
+
self.resource_models = self.build_resource_models(
|
|
1103
|
+
self.resource_types, schemas_response.resources
|
|
1104
|
+
)
|
|
1105
|
+
|
|
1106
|
+
if service_provider_config:
|
|
1107
|
+
self.service_provider_config = await spc_task
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: scim2-client
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Pythonically build SCIM requests and parse SCIM responses
|
|
5
5
|
Project-URL: documentation, https://scim2-client.readthedocs.io
|
|
6
6
|
Project-URL: repository, https://github.com/python-scim/scim2-client
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
scim2_client/__init__.py,sha256=l0pyBLiTpFA68ao98PqQLT_Xx0mw8BHumwrIHYCWa_M,845
|
|
2
|
-
scim2_client/client.py,sha256=
|
|
2
|
+
scim2_client/client.py,sha256=zxUU62PgTIiL-QlUnO4Pd6-kaAlGp3sfyNaytMmMSwI,45046
|
|
3
3
|
scim2_client/errors.py,sha256=FVmRXsaZLn1VZhJ3dSDs4IqycuU92AEun9JWWMseVO8,4397
|
|
4
4
|
scim2_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
scim2_client/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
scim2_client/engines/httpx.py,sha256=L39ZZHjqe43uIQpgh_r_maqM2gkf3_Rk6d8MeNe57gk,17781
|
|
7
7
|
scim2_client/engines/werkzeug.py,sha256=mVpK0GjmD4fu0jI0W2zqrn7GjBFZ0AjNk2gBO5415Gk,10230
|
|
8
|
-
scim2_client-0.4.
|
|
9
|
-
scim2_client-0.4.
|
|
10
|
-
scim2_client-0.4.
|
|
11
|
-
scim2_client-0.4.
|
|
8
|
+
scim2_client-0.4.2.dist-info/METADATA,sha256=KG9frELmv2zQN52PpoUtFjhJ5aHgBO49b556kUV78iU,16961
|
|
9
|
+
scim2_client-0.4.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
10
|
+
scim2_client-0.4.2.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
11
|
+
scim2_client-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|