brynq-sdk-azure 3.0.0__tar.gz → 3.0.1__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.
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/PKG-INFO +1 -1
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure/entra.py +18 -14
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/PKG-INFO +1 -1
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/setup.py +1 -1
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure/__init__.py +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure/azure_connection.py +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure/blob_storage.py +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/not-zip-safe +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/requires.txt +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/top_level.txt +0 -0
- {brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/setup.cfg +0 -0
|
@@ -20,24 +20,28 @@ class Entra(BrynQ):
|
|
|
20
20
|
self.timeout = 3600
|
|
21
21
|
|
|
22
22
|
def __get_headers(self, system_type):
|
|
23
|
-
credentials = self.interfaces.credentials.get(system='azure-entra-
|
|
23
|
+
credentials = self.interfaces.credentials.get(system='azure-entra-o-auth-2', system_type=system_type)
|
|
24
24
|
credentials = credentials.get('data')
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if credentials.get("type") == 'custom':
|
|
26
|
+
tenant_id = credentials['tenant_id']
|
|
27
|
+
client_id = credentials['client_id']
|
|
28
|
+
client_secret = credentials['client_secret']
|
|
29
|
+
authority = f"https://login.microsoftonline.com/{tenant_id}"
|
|
30
|
+
# Create a ConfidentialClientApplication for authentication
|
|
31
|
+
app = ConfidentialClientApplication(
|
|
32
|
+
client_id,
|
|
33
|
+
authority=authority,
|
|
34
|
+
client_credential=client_secret,
|
|
35
|
+
)
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
37
|
+
# Get an access token for the Graph API
|
|
38
|
+
result = app.acquire_token_for_client(scopes=["https://graph.microsoft.com/.default"])
|
|
39
|
+
access_token = result.get('access_token')
|
|
40
|
+
elif credentials.get("type") == 'oauth2':
|
|
41
|
+
access_token = credentials.get('access_token')
|
|
36
42
|
|
|
37
|
-
# Get an access token for the Graph API
|
|
38
|
-
result = app.acquire_token_for_client(scopes=["https://graph.microsoft.com/.default"])
|
|
39
43
|
headers = {
|
|
40
|
-
'Authorization': f"Bearer {
|
|
44
|
+
'Authorization': f"Bearer {access_token}",
|
|
41
45
|
'Content-Type': 'application/json'
|
|
42
46
|
}
|
|
43
47
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_azure-3.0.0 → brynq_sdk_azure-3.0.1}/brynq_sdk_azure.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|