MCPcopy Create free account
hub / github.com/Roy3838/Observer / _mgmt_request

Function _mgmt_request

api/auth0_manager.py:88–103  ·  view source on GitHub ↗

One authenticated Management API call. `path` is relative to /api/v2/. Raises httpx.HTTPStatusError on a 4xx/5xx, like raise_for_status() did.

(method: str, path: str, **kwargs)

Source from the content-addressed store, hash-verified

86
87
88async def _mgmt_request(method: str, path: str, **kwargs) -> httpx.Response:
89 """
90 One authenticated Management API call. `path` is relative to /api/v2/.
91 Raises httpx.HTTPStatusError on a 4xx/5xx, like raise_for_status() did.
92 """
93 token = await _get_management_api_token()
94 async with _MGMT_SLOTS:
95 response = await get_http_client().request(
96 method,
97 f"{MGMT_API_AUDIENCE}{path}",
98 headers={"Authorization": f"Bearer {token}"},
99 timeout=AUTH0_TIMEOUT,
100 **kwargs,
101 )
102 response.raise_for_status()
103 return response
104
105
106def _user_path(user_id: str) -> str:

Callers 8

find_user_by_emailFunction · 0.85
get_email_by_idFunction · 0.85
delete_userFunction · 0.85
get_user_app_metadataFunction · 0.85

Calls 2

get_http_clientFunction · 0.90

Tested by

no test coverage detected