cdp.auth.clients package¶
Subpackages¶
Module contents¶
HTTP client implementations for CDP authentication.
This module exports concrete HTTP client implementations for making authenticated requests to CDP services.
- class cdp.auth.clients.Urllib3AuthClient(options, base_url, debug=False)¶
Bases:
objectHTTP client that automatically adds authentication headers.
- request(method, url, headers=None, body=None, **kwargs)¶
Make an authenticated HTTP request.
- Parameters:
method (
str) – The HTTP methodurl (
str) – The URL to request (relative or absolute)headers (
Optional[dict[str,str]]) – Optional additional headersbody (
Union[dict[str,Any],bytes,None]) – Optional request body (can be a dict for JSON or bytes)**kwargs (
Any) – Additional arguments passed to urllib3.request()
- Return type:
HTTPResponse- Returns:
urllib3.HTTPResponse
- class cdp.auth.clients.Urllib3AuthClientOptions(**data)¶
Bases:
BaseModelConfiguration options for the authenticated HTTP client.
- api_key_id - The API key ID
Examples
‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ ‘organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
- api_key_secret - The API key secret
Examples
‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==’ (Edwards key (Ed25519)) ‘—–BEGIN EC PRIVATE KEY—–n…n…n…==n—–END EC PRIVATE KEY—–n’ (EC key (ES256))
- [wallet_secret] - Optional wallet secret for authenticating with endpoints that require wallet authentication.
- [source] - Optional source of the request
- [source_version] - Optional version of the source of the request
- [expires_in] - Optional expiration time in seconds
- Type:
defaults to 120
-
api_key_id:
str¶
-
api_key_secret:
str¶
-
expires_in:
int|None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
source:
str|None¶
-
source_version:
str|None¶
-
wallet_secret:
str|None¶