telnyx 3.0.0__py3-none-any.whl → 3.1.0__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.
Potentially problematic release.
This version of telnyx might be problematic. Click here for more details.
- telnyx/_client.py +35 -786
- telnyx/_version.py +1 -1
- telnyx/resources/__init__.py +24 -24
- telnyx/resources/brand/brand.py +8 -4
- telnyx/resources/calls/calls.py +12 -0
- telnyx/resources/oauth.py +317 -315
- telnyx/resources/oauth_grants.py +15 -15
- telnyx/resources/verified_numbers/verified_numbers.py +25 -4
- telnyx/types/__init__.py +12 -19
- telnyx/types/addresses/action_validate_response.py +8 -3
- telnyx/types/ai/inference_embedding_transfer_tool_params.py +6 -0
- telnyx/types/ai/inference_embedding_transfer_tool_params_param.py +6 -0
- telnyx/types/ai/voice_settings.py +49 -2
- telnyx/types/ai/voice_settings_param.py +49 -2
- telnyx/types/brand_create_params.py +2 -1
- telnyx/types/brand_update_params.py +2 -1
- telnyx/types/call_dial_params.py +8 -0
- telnyx/types/country_coverage_retrieve_country_response.py +7 -0
- telnyx/types/country_coverage_retrieve_response.py +7 -0
- telnyx/types/{api_error.py → error.py} +2 -2
- telnyx/types/{oauth_retrieve_authorize_params.py → oauth_authorize_params.py} +2 -2
- telnyx/types/{oauth_grants_params.py → oauth_create_grant_params.py} +2 -2
- telnyx/types/{oauth_grants_response.py → oauth_create_grant_response.py} +2 -2
- telnyx/types/{oauth_token_params.py → oauth_exchange_token_params.py} +2 -2
- telnyx/types/{oauth_token_response.py → oauth_exchange_token_response.py} +2 -2
- telnyx/types/{oauth_grant_delete_response.py → oauth_grant_revoke_response.py} +2 -2
- telnyx/types/{oauth_introspect_params.py → oauth_introspect_token_params.py} +2 -2
- telnyx/types/{oauth_introspect_response.py → oauth_introspect_token_response.py} +2 -2
- telnyx/types/{oauth_register_params.py → oauth_register_client_params.py} +2 -2
- telnyx/types/{oauth_register_response.py → oauth_register_client_response.py} +2 -2
- telnyx/types/{oauth_retrieve_response.py → oauth_retrieve_consent_response.py} +2 -2
- telnyx/types/verified_number_create_params.py +10 -0
- telnyx/types/verify_profile.py +18 -3
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/METADATA +1 -1
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/RECORD +37 -44
- telnyx/types/client_create_bucket_params.py +0 -13
- telnyx/types/client_delete_objects_params.py +0 -20
- telnyx/types/client_get_object_params.py +0 -15
- telnyx/types/client_list_objects_params.py +0 -13
- telnyx/types/client_put_object_params.py +0 -20
- telnyx/types/list_buckets_response.py +0 -20
- telnyx/types/list_objects_response.py +0 -24
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/WHEEL +0 -0
- {telnyx-3.0.0.dist-info → telnyx-3.1.0.dist-info}/licenses/LICENSE +0 -0
telnyx/resources/oauth.py
CHANGED
|
@@ -8,11 +8,11 @@ from typing_extensions import Literal
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..types import (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
oauth_authorize_params,
|
|
12
|
+
oauth_create_grant_params,
|
|
13
|
+
oauth_exchange_token_params,
|
|
14
|
+
oauth_register_client_params,
|
|
15
|
+
oauth_introspect_token_params,
|
|
16
16
|
)
|
|
17
17
|
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
|
|
18
18
|
from .._utils import maybe_transform, async_maybe_transform
|
|
@@ -25,12 +25,12 @@ from .._response import (
|
|
|
25
25
|
async_to_streamed_response_wrapper,
|
|
26
26
|
)
|
|
27
27
|
from .._base_client import make_request_options
|
|
28
|
-
from ..types.
|
|
29
|
-
from ..types.oauth_grants_response import OAuthGrantsResponse
|
|
30
|
-
from ..types.oauth_register_response import OAuthRegisterResponse
|
|
31
|
-
from ..types.oauth_retrieve_response import OAuthRetrieveResponse
|
|
32
|
-
from ..types.oauth_introspect_response import OAuthIntrospectResponse
|
|
28
|
+
from ..types.oauth_create_grant_response import OAuthCreateGrantResponse
|
|
33
29
|
from ..types.oauth_retrieve_jwks_response import OAuthRetrieveJwksResponse
|
|
30
|
+
from ..types.oauth_exchange_token_response import OAuthExchangeTokenResponse
|
|
31
|
+
from ..types.oauth_register_client_response import OAuthRegisterClientResponse
|
|
32
|
+
from ..types.oauth_introspect_token_response import OAuthIntrospectTokenResponse
|
|
33
|
+
from ..types.oauth_retrieve_consent_response import OAuthRetrieveConsentResponse
|
|
34
34
|
|
|
35
35
|
__all__ = ["OAuthResource", "AsyncOAuthResource"]
|
|
36
36
|
|
|
@@ -55,21 +55,41 @@ class OAuthResource(SyncAPIResource):
|
|
|
55
55
|
"""
|
|
56
56
|
return OAuthResourceWithStreamingResponse(self)
|
|
57
57
|
|
|
58
|
-
def
|
|
58
|
+
def authorize(
|
|
59
59
|
self,
|
|
60
|
-
consent_token: str,
|
|
61
60
|
*,
|
|
61
|
+
client_id: str,
|
|
62
|
+
redirect_uri: str,
|
|
63
|
+
response_type: Literal["code"],
|
|
64
|
+
code_challenge: str | Omit = omit,
|
|
65
|
+
code_challenge_method: Literal["plain", "S256"] | Omit = omit,
|
|
66
|
+
scope: str | Omit = omit,
|
|
67
|
+
state: str | Omit = omit,
|
|
62
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
69
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
64
70
|
extra_headers: Headers | None = None,
|
|
65
71
|
extra_query: Query | None = None,
|
|
66
72
|
extra_body: Body | None = None,
|
|
67
73
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
68
|
-
) ->
|
|
74
|
+
) -> None:
|
|
69
75
|
"""
|
|
70
|
-
|
|
76
|
+
OAuth 2.0 authorization endpoint for the authorization code flow
|
|
71
77
|
|
|
72
78
|
Args:
|
|
79
|
+
client_id: OAuth client identifier
|
|
80
|
+
|
|
81
|
+
redirect_uri: Redirect URI
|
|
82
|
+
|
|
83
|
+
response_type: OAuth response type
|
|
84
|
+
|
|
85
|
+
code_challenge: PKCE code challenge
|
|
86
|
+
|
|
87
|
+
code_challenge_method: PKCE code challenge method
|
|
88
|
+
|
|
89
|
+
scope: Space-separated list of requested scopes
|
|
90
|
+
|
|
91
|
+
state: State parameter for CSRF protection
|
|
92
|
+
|
|
73
93
|
extra_headers: Send extra headers
|
|
74
94
|
|
|
75
95
|
extra_query: Add additional query parameters to the request
|
|
@@ -78,17 +98,31 @@ class OAuthResource(SyncAPIResource):
|
|
|
78
98
|
|
|
79
99
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
80
100
|
"""
|
|
81
|
-
|
|
82
|
-
raise ValueError(f"Expected a non-empty value for `consent_token` but received {consent_token!r}")
|
|
101
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
83
102
|
return self._get(
|
|
84
|
-
|
|
103
|
+
"/oauth/authorize",
|
|
85
104
|
options=make_request_options(
|
|
86
|
-
extra_headers=extra_headers,
|
|
105
|
+
extra_headers=extra_headers,
|
|
106
|
+
extra_query=extra_query,
|
|
107
|
+
extra_body=extra_body,
|
|
108
|
+
timeout=timeout,
|
|
109
|
+
query=maybe_transform(
|
|
110
|
+
{
|
|
111
|
+
"client_id": client_id,
|
|
112
|
+
"redirect_uri": redirect_uri,
|
|
113
|
+
"response_type": response_type,
|
|
114
|
+
"code_challenge": code_challenge,
|
|
115
|
+
"code_challenge_method": code_challenge_method,
|
|
116
|
+
"scope": scope,
|
|
117
|
+
"state": state,
|
|
118
|
+
},
|
|
119
|
+
oauth_authorize_params.OAuthAuthorizeParams,
|
|
120
|
+
),
|
|
87
121
|
),
|
|
88
|
-
cast_to=
|
|
122
|
+
cast_to=NoneType,
|
|
89
123
|
)
|
|
90
124
|
|
|
91
|
-
def
|
|
125
|
+
def create_grant(
|
|
92
126
|
self,
|
|
93
127
|
*,
|
|
94
128
|
allowed: bool,
|
|
@@ -99,7 +133,7 @@ class OAuthResource(SyncAPIResource):
|
|
|
99
133
|
extra_query: Query | None = None,
|
|
100
134
|
extra_body: Body | None = None,
|
|
101
135
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
102
|
-
) ->
|
|
136
|
+
) -> OAuthCreateGrantResponse:
|
|
103
137
|
"""
|
|
104
138
|
Create an OAuth authorization grant
|
|
105
139
|
|
|
@@ -123,15 +157,83 @@ class OAuthResource(SyncAPIResource):
|
|
|
123
157
|
"allowed": allowed,
|
|
124
158
|
"consent_token": consent_token,
|
|
125
159
|
},
|
|
126
|
-
|
|
160
|
+
oauth_create_grant_params.OAuthCreateGrantParams,
|
|
161
|
+
),
|
|
162
|
+
options=make_request_options(
|
|
163
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
164
|
+
),
|
|
165
|
+
cast_to=OAuthCreateGrantResponse,
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
def exchange_token(
|
|
169
|
+
self,
|
|
170
|
+
*,
|
|
171
|
+
grant_type: Literal["client_credentials", "authorization_code", "refresh_token"],
|
|
172
|
+
client_id: str | Omit = omit,
|
|
173
|
+
client_secret: str | Omit = omit,
|
|
174
|
+
code: str | Omit = omit,
|
|
175
|
+
code_verifier: str | Omit = omit,
|
|
176
|
+
redirect_uri: str | Omit = omit,
|
|
177
|
+
refresh_token: str | Omit = omit,
|
|
178
|
+
scope: str | Omit = omit,
|
|
179
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
180
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
181
|
+
extra_headers: Headers | None = None,
|
|
182
|
+
extra_query: Query | None = None,
|
|
183
|
+
extra_body: Body | None = None,
|
|
184
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
185
|
+
) -> OAuthExchangeTokenResponse:
|
|
186
|
+
"""
|
|
187
|
+
Exchange authorization code, client credentials, or refresh token for access
|
|
188
|
+
token
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
grant_type: OAuth 2.0 grant type
|
|
192
|
+
|
|
193
|
+
client_id: OAuth client ID (if not using HTTP Basic auth)
|
|
194
|
+
|
|
195
|
+
client_secret: OAuth client secret (if not using HTTP Basic auth)
|
|
196
|
+
|
|
197
|
+
code: Authorization code (for authorization_code flow)
|
|
198
|
+
|
|
199
|
+
code_verifier: PKCE code verifier (for authorization_code flow)
|
|
200
|
+
|
|
201
|
+
redirect_uri: Redirect URI (for authorization_code flow)
|
|
202
|
+
|
|
203
|
+
refresh_token: Refresh token (for refresh_token flow)
|
|
204
|
+
|
|
205
|
+
scope: Space-separated list of requested scopes (for client_credentials)
|
|
206
|
+
|
|
207
|
+
extra_headers: Send extra headers
|
|
208
|
+
|
|
209
|
+
extra_query: Add additional query parameters to the request
|
|
210
|
+
|
|
211
|
+
extra_body: Add additional JSON properties to the request
|
|
212
|
+
|
|
213
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
214
|
+
"""
|
|
215
|
+
return self._post(
|
|
216
|
+
"/oauth/token",
|
|
217
|
+
body=maybe_transform(
|
|
218
|
+
{
|
|
219
|
+
"grant_type": grant_type,
|
|
220
|
+
"client_id": client_id,
|
|
221
|
+
"client_secret": client_secret,
|
|
222
|
+
"code": code,
|
|
223
|
+
"code_verifier": code_verifier,
|
|
224
|
+
"redirect_uri": redirect_uri,
|
|
225
|
+
"refresh_token": refresh_token,
|
|
226
|
+
"scope": scope,
|
|
227
|
+
},
|
|
228
|
+
oauth_exchange_token_params.OAuthExchangeTokenParams,
|
|
127
229
|
),
|
|
128
230
|
options=make_request_options(
|
|
129
231
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
130
232
|
),
|
|
131
|
-
cast_to=
|
|
233
|
+
cast_to=OAuthExchangeTokenResponse,
|
|
132
234
|
)
|
|
133
235
|
|
|
134
|
-
def
|
|
236
|
+
def introspect_token(
|
|
135
237
|
self,
|
|
136
238
|
*,
|
|
137
239
|
token: str,
|
|
@@ -141,7 +243,7 @@ class OAuthResource(SyncAPIResource):
|
|
|
141
243
|
extra_query: Query | None = None,
|
|
142
244
|
extra_body: Body | None = None,
|
|
143
245
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
144
|
-
) ->
|
|
246
|
+
) -> OAuthIntrospectTokenResponse:
|
|
145
247
|
"""
|
|
146
248
|
Introspect an OAuth access token to check its validity and metadata
|
|
147
249
|
|
|
@@ -158,14 +260,14 @@ class OAuthResource(SyncAPIResource):
|
|
|
158
260
|
"""
|
|
159
261
|
return self._post(
|
|
160
262
|
"/oauth/introspect",
|
|
161
|
-
body=maybe_transform({"token": token},
|
|
263
|
+
body=maybe_transform({"token": token}, oauth_introspect_token_params.OAuthIntrospectTokenParams),
|
|
162
264
|
options=make_request_options(
|
|
163
265
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
164
266
|
),
|
|
165
|
-
cast_to=
|
|
267
|
+
cast_to=OAuthIntrospectTokenResponse,
|
|
166
268
|
)
|
|
167
269
|
|
|
168
|
-
def
|
|
270
|
+
def register_client(
|
|
169
271
|
self,
|
|
170
272
|
*,
|
|
171
273
|
client_name: str | Omit = omit,
|
|
@@ -183,7 +285,7 @@ class OAuthResource(SyncAPIResource):
|
|
|
183
285
|
extra_query: Query | None = None,
|
|
184
286
|
extra_body: Body | None = None,
|
|
185
287
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
186
|
-
) ->
|
|
288
|
+
) -> OAuthRegisterClientResponse:
|
|
187
289
|
"""
|
|
188
290
|
Register a new OAuth client dynamically (RFC 7591)
|
|
189
291
|
|
|
@@ -228,15 +330,88 @@ class OAuthResource(SyncAPIResource):
|
|
|
228
330
|
"token_endpoint_auth_method": token_endpoint_auth_method,
|
|
229
331
|
"tos_uri": tos_uri,
|
|
230
332
|
},
|
|
231
|
-
|
|
333
|
+
oauth_register_client_params.OAuthRegisterClientParams,
|
|
334
|
+
),
|
|
335
|
+
options=make_request_options(
|
|
336
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
337
|
+
),
|
|
338
|
+
cast_to=OAuthRegisterClientResponse,
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
def retrieve_consent(
|
|
342
|
+
self,
|
|
343
|
+
consent_token: str,
|
|
344
|
+
*,
|
|
345
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
346
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
347
|
+
extra_headers: Headers | None = None,
|
|
348
|
+
extra_query: Query | None = None,
|
|
349
|
+
extra_body: Body | None = None,
|
|
350
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
351
|
+
) -> OAuthRetrieveConsentResponse:
|
|
352
|
+
"""
|
|
353
|
+
Retrieve details about an OAuth consent token
|
|
354
|
+
|
|
355
|
+
Args:
|
|
356
|
+
extra_headers: Send extra headers
|
|
357
|
+
|
|
358
|
+
extra_query: Add additional query parameters to the request
|
|
359
|
+
|
|
360
|
+
extra_body: Add additional JSON properties to the request
|
|
361
|
+
|
|
362
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
363
|
+
"""
|
|
364
|
+
if not consent_token:
|
|
365
|
+
raise ValueError(f"Expected a non-empty value for `consent_token` but received {consent_token!r}")
|
|
366
|
+
return self._get(
|
|
367
|
+
f"/oauth/consent/{consent_token}",
|
|
368
|
+
options=make_request_options(
|
|
369
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
232
370
|
),
|
|
371
|
+
cast_to=OAuthRetrieveConsentResponse,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
def retrieve_jwks(
|
|
375
|
+
self,
|
|
376
|
+
*,
|
|
377
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
378
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
379
|
+
extra_headers: Headers | None = None,
|
|
380
|
+
extra_query: Query | None = None,
|
|
381
|
+
extra_body: Body | None = None,
|
|
382
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
383
|
+
) -> OAuthRetrieveJwksResponse:
|
|
384
|
+
"""Retrieve the JSON Web Key Set for token verification"""
|
|
385
|
+
return self._get(
|
|
386
|
+
"/oauth/jwks",
|
|
233
387
|
options=make_request_options(
|
|
234
388
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
235
389
|
),
|
|
236
|
-
cast_to=
|
|
390
|
+
cast_to=OAuthRetrieveJwksResponse,
|
|
237
391
|
)
|
|
238
392
|
|
|
239
|
-
|
|
393
|
+
|
|
394
|
+
class AsyncOAuthResource(AsyncAPIResource):
|
|
395
|
+
@cached_property
|
|
396
|
+
def with_raw_response(self) -> AsyncOAuthResourceWithRawResponse:
|
|
397
|
+
"""
|
|
398
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
399
|
+
the raw response object instead of the parsed content.
|
|
400
|
+
|
|
401
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
|
|
402
|
+
"""
|
|
403
|
+
return AsyncOAuthResourceWithRawResponse(self)
|
|
404
|
+
|
|
405
|
+
@cached_property
|
|
406
|
+
def with_streaming_response(self) -> AsyncOAuthResourceWithStreamingResponse:
|
|
407
|
+
"""
|
|
408
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
409
|
+
|
|
410
|
+
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
|
|
411
|
+
"""
|
|
412
|
+
return AsyncOAuthResourceWithStreamingResponse(self)
|
|
413
|
+
|
|
414
|
+
async def authorize(
|
|
240
415
|
self,
|
|
241
416
|
*,
|
|
242
417
|
client_id: str,
|
|
@@ -280,14 +455,14 @@ class OAuthResource(SyncAPIResource):
|
|
|
280
455
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
281
456
|
"""
|
|
282
457
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
283
|
-
return self._get(
|
|
458
|
+
return await self._get(
|
|
284
459
|
"/oauth/authorize",
|
|
285
460
|
options=make_request_options(
|
|
286
461
|
extra_headers=extra_headers,
|
|
287
462
|
extra_query=extra_query,
|
|
288
463
|
extra_body=extra_body,
|
|
289
464
|
timeout=timeout,
|
|
290
|
-
query=
|
|
465
|
+
query=await async_maybe_transform(
|
|
291
466
|
{
|
|
292
467
|
"client_id": client_id,
|
|
293
468
|
"redirect_uri": redirect_uri,
|
|
@@ -297,32 +472,56 @@ class OAuthResource(SyncAPIResource):
|
|
|
297
472
|
"scope": scope,
|
|
298
473
|
"state": state,
|
|
299
474
|
},
|
|
300
|
-
|
|
475
|
+
oauth_authorize_params.OAuthAuthorizeParams,
|
|
301
476
|
),
|
|
302
477
|
),
|
|
303
478
|
cast_to=NoneType,
|
|
304
479
|
)
|
|
305
480
|
|
|
306
|
-
def
|
|
481
|
+
async def create_grant(
|
|
307
482
|
self,
|
|
308
483
|
*,
|
|
484
|
+
allowed: bool,
|
|
485
|
+
consent_token: str,
|
|
309
486
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
310
487
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
311
488
|
extra_headers: Headers | None = None,
|
|
312
489
|
extra_query: Query | None = None,
|
|
313
490
|
extra_body: Body | None = None,
|
|
314
491
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
315
|
-
) ->
|
|
316
|
-
"""
|
|
317
|
-
|
|
318
|
-
|
|
492
|
+
) -> OAuthCreateGrantResponse:
|
|
493
|
+
"""
|
|
494
|
+
Create an OAuth authorization grant
|
|
495
|
+
|
|
496
|
+
Args:
|
|
497
|
+
allowed: Whether the grant is allowed
|
|
498
|
+
|
|
499
|
+
consent_token: Consent token
|
|
500
|
+
|
|
501
|
+
extra_headers: Send extra headers
|
|
502
|
+
|
|
503
|
+
extra_query: Add additional query parameters to the request
|
|
504
|
+
|
|
505
|
+
extra_body: Add additional JSON properties to the request
|
|
506
|
+
|
|
507
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
508
|
+
"""
|
|
509
|
+
return await self._post(
|
|
510
|
+
"/oauth/grants",
|
|
511
|
+
body=await async_maybe_transform(
|
|
512
|
+
{
|
|
513
|
+
"allowed": allowed,
|
|
514
|
+
"consent_token": consent_token,
|
|
515
|
+
},
|
|
516
|
+
oauth_create_grant_params.OAuthCreateGrantParams,
|
|
517
|
+
),
|
|
319
518
|
options=make_request_options(
|
|
320
519
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
321
520
|
),
|
|
322
|
-
cast_to=
|
|
521
|
+
cast_to=OAuthCreateGrantResponse,
|
|
323
522
|
)
|
|
324
523
|
|
|
325
|
-
def
|
|
524
|
+
async def exchange_token(
|
|
326
525
|
self,
|
|
327
526
|
*,
|
|
328
527
|
grant_type: Literal["client_credentials", "authorization_code", "refresh_token"],
|
|
@@ -339,7 +538,7 @@ class OAuthResource(SyncAPIResource):
|
|
|
339
538
|
extra_query: Query | None = None,
|
|
340
539
|
extra_body: Body | None = None,
|
|
341
540
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
342
|
-
) ->
|
|
541
|
+
) -> OAuthExchangeTokenResponse:
|
|
343
542
|
"""
|
|
344
543
|
Exchange authorization code, client credentials, or refresh token for access
|
|
345
544
|
token
|
|
@@ -369,9 +568,9 @@ class OAuthResource(SyncAPIResource):
|
|
|
369
568
|
|
|
370
569
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
371
570
|
"""
|
|
372
|
-
return self._post(
|
|
571
|
+
return await self._post(
|
|
373
572
|
"/oauth/token",
|
|
374
|
-
body=
|
|
573
|
+
body=await async_maybe_transform(
|
|
375
574
|
{
|
|
376
575
|
"grant_type": grant_type,
|
|
377
576
|
"client_id": client_id,
|
|
@@ -382,112 +581,15 @@ class OAuthResource(SyncAPIResource):
|
|
|
382
581
|
"refresh_token": refresh_token,
|
|
383
582
|
"scope": scope,
|
|
384
583
|
},
|
|
385
|
-
|
|
386
|
-
),
|
|
387
|
-
options=make_request_options(
|
|
388
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
389
|
-
),
|
|
390
|
-
cast_to=OAuthTokenResponse,
|
|
391
|
-
)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
class AsyncOAuthResource(AsyncAPIResource):
|
|
395
|
-
@cached_property
|
|
396
|
-
def with_raw_response(self) -> AsyncOAuthResourceWithRawResponse:
|
|
397
|
-
"""
|
|
398
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
399
|
-
the raw response object instead of the parsed content.
|
|
400
|
-
|
|
401
|
-
For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
|
|
402
|
-
"""
|
|
403
|
-
return AsyncOAuthResourceWithRawResponse(self)
|
|
404
|
-
|
|
405
|
-
@cached_property
|
|
406
|
-
def with_streaming_response(self) -> AsyncOAuthResourceWithStreamingResponse:
|
|
407
|
-
"""
|
|
408
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
409
|
-
|
|
410
|
-
For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response
|
|
411
|
-
"""
|
|
412
|
-
return AsyncOAuthResourceWithStreamingResponse(self)
|
|
413
|
-
|
|
414
|
-
async def retrieve(
|
|
415
|
-
self,
|
|
416
|
-
consent_token: str,
|
|
417
|
-
*,
|
|
418
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
419
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
420
|
-
extra_headers: Headers | None = None,
|
|
421
|
-
extra_query: Query | None = None,
|
|
422
|
-
extra_body: Body | None = None,
|
|
423
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
424
|
-
) -> OAuthRetrieveResponse:
|
|
425
|
-
"""
|
|
426
|
-
Retrieve details about an OAuth consent token
|
|
427
|
-
|
|
428
|
-
Args:
|
|
429
|
-
extra_headers: Send extra headers
|
|
430
|
-
|
|
431
|
-
extra_query: Add additional query parameters to the request
|
|
432
|
-
|
|
433
|
-
extra_body: Add additional JSON properties to the request
|
|
434
|
-
|
|
435
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
436
|
-
"""
|
|
437
|
-
if not consent_token:
|
|
438
|
-
raise ValueError(f"Expected a non-empty value for `consent_token` but received {consent_token!r}")
|
|
439
|
-
return await self._get(
|
|
440
|
-
f"/oauth/consent/{consent_token}",
|
|
441
|
-
options=make_request_options(
|
|
442
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
443
|
-
),
|
|
444
|
-
cast_to=OAuthRetrieveResponse,
|
|
445
|
-
)
|
|
446
|
-
|
|
447
|
-
async def grants(
|
|
448
|
-
self,
|
|
449
|
-
*,
|
|
450
|
-
allowed: bool,
|
|
451
|
-
consent_token: str,
|
|
452
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
453
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
454
|
-
extra_headers: Headers | None = None,
|
|
455
|
-
extra_query: Query | None = None,
|
|
456
|
-
extra_body: Body | None = None,
|
|
457
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
458
|
-
) -> OAuthGrantsResponse:
|
|
459
|
-
"""
|
|
460
|
-
Create an OAuth authorization grant
|
|
461
|
-
|
|
462
|
-
Args:
|
|
463
|
-
allowed: Whether the grant is allowed
|
|
464
|
-
|
|
465
|
-
consent_token: Consent token
|
|
466
|
-
|
|
467
|
-
extra_headers: Send extra headers
|
|
468
|
-
|
|
469
|
-
extra_query: Add additional query parameters to the request
|
|
470
|
-
|
|
471
|
-
extra_body: Add additional JSON properties to the request
|
|
472
|
-
|
|
473
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
474
|
-
"""
|
|
475
|
-
return await self._post(
|
|
476
|
-
"/oauth/grants",
|
|
477
|
-
body=await async_maybe_transform(
|
|
478
|
-
{
|
|
479
|
-
"allowed": allowed,
|
|
480
|
-
"consent_token": consent_token,
|
|
481
|
-
},
|
|
482
|
-
oauth_grants_params.OAuthGrantsParams,
|
|
584
|
+
oauth_exchange_token_params.OAuthExchangeTokenParams,
|
|
483
585
|
),
|
|
484
586
|
options=make_request_options(
|
|
485
587
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
486
588
|
),
|
|
487
|
-
cast_to=
|
|
589
|
+
cast_to=OAuthExchangeTokenResponse,
|
|
488
590
|
)
|
|
489
591
|
|
|
490
|
-
async def
|
|
592
|
+
async def introspect_token(
|
|
491
593
|
self,
|
|
492
594
|
*,
|
|
493
595
|
token: str,
|
|
@@ -497,7 +599,7 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
497
599
|
extra_query: Query | None = None,
|
|
498
600
|
extra_body: Body | None = None,
|
|
499
601
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
500
|
-
) ->
|
|
602
|
+
) -> OAuthIntrospectTokenResponse:
|
|
501
603
|
"""
|
|
502
604
|
Introspect an OAuth access token to check its validity and metadata
|
|
503
605
|
|
|
@@ -514,14 +616,16 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
514
616
|
"""
|
|
515
617
|
return await self._post(
|
|
516
618
|
"/oauth/introspect",
|
|
517
|
-
body=await async_maybe_transform(
|
|
619
|
+
body=await async_maybe_transform(
|
|
620
|
+
{"token": token}, oauth_introspect_token_params.OAuthIntrospectTokenParams
|
|
621
|
+
),
|
|
518
622
|
options=make_request_options(
|
|
519
623
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
520
624
|
),
|
|
521
|
-
cast_to=
|
|
625
|
+
cast_to=OAuthIntrospectTokenResponse,
|
|
522
626
|
)
|
|
523
627
|
|
|
524
|
-
async def
|
|
628
|
+
async def register_client(
|
|
525
629
|
self,
|
|
526
630
|
*,
|
|
527
631
|
client_name: str | Omit = omit,
|
|
@@ -539,7 +643,7 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
539
643
|
extra_query: Query | None = None,
|
|
540
644
|
extra_body: Body | None = None,
|
|
541
645
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
542
|
-
) ->
|
|
646
|
+
) -> OAuthRegisterClientResponse:
|
|
543
647
|
"""
|
|
544
648
|
Register a new OAuth client dynamically (RFC 7591)
|
|
545
649
|
|
|
@@ -584,49 +688,29 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
584
688
|
"token_endpoint_auth_method": token_endpoint_auth_method,
|
|
585
689
|
"tos_uri": tos_uri,
|
|
586
690
|
},
|
|
587
|
-
|
|
691
|
+
oauth_register_client_params.OAuthRegisterClientParams,
|
|
588
692
|
),
|
|
589
693
|
options=make_request_options(
|
|
590
694
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
591
695
|
),
|
|
592
|
-
cast_to=
|
|
696
|
+
cast_to=OAuthRegisterClientResponse,
|
|
593
697
|
)
|
|
594
698
|
|
|
595
|
-
async def
|
|
699
|
+
async def retrieve_consent(
|
|
596
700
|
self,
|
|
701
|
+
consent_token: str,
|
|
597
702
|
*,
|
|
598
|
-
client_id: str,
|
|
599
|
-
redirect_uri: str,
|
|
600
|
-
response_type: Literal["code"],
|
|
601
|
-
code_challenge: str | Omit = omit,
|
|
602
|
-
code_challenge_method: Literal["plain", "S256"] | Omit = omit,
|
|
603
|
-
scope: str | Omit = omit,
|
|
604
|
-
state: str | Omit = omit,
|
|
605
703
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
606
704
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
607
705
|
extra_headers: Headers | None = None,
|
|
608
706
|
extra_query: Query | None = None,
|
|
609
707
|
extra_body: Body | None = None,
|
|
610
708
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
611
|
-
) ->
|
|
709
|
+
) -> OAuthRetrieveConsentResponse:
|
|
612
710
|
"""
|
|
613
|
-
|
|
711
|
+
Retrieve details about an OAuth consent token
|
|
614
712
|
|
|
615
713
|
Args:
|
|
616
|
-
client_id: OAuth client identifier
|
|
617
|
-
|
|
618
|
-
redirect_uri: Redirect URI
|
|
619
|
-
|
|
620
|
-
response_type: OAuth response type
|
|
621
|
-
|
|
622
|
-
code_challenge: PKCE code challenge
|
|
623
|
-
|
|
624
|
-
code_challenge_method: PKCE code challenge method
|
|
625
|
-
|
|
626
|
-
scope: Space-separated list of requested scopes
|
|
627
|
-
|
|
628
|
-
state: State parameter for CSRF protection
|
|
629
|
-
|
|
630
714
|
extra_headers: Send extra headers
|
|
631
715
|
|
|
632
716
|
extra_query: Add additional query parameters to the request
|
|
@@ -635,28 +719,14 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
635
719
|
|
|
636
720
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
637
721
|
"""
|
|
638
|
-
|
|
722
|
+
if not consent_token:
|
|
723
|
+
raise ValueError(f"Expected a non-empty value for `consent_token` but received {consent_token!r}")
|
|
639
724
|
return await self._get(
|
|
640
|
-
"/oauth/
|
|
725
|
+
f"/oauth/consent/{consent_token}",
|
|
641
726
|
options=make_request_options(
|
|
642
|
-
extra_headers=extra_headers,
|
|
643
|
-
extra_query=extra_query,
|
|
644
|
-
extra_body=extra_body,
|
|
645
|
-
timeout=timeout,
|
|
646
|
-
query=await async_maybe_transform(
|
|
647
|
-
{
|
|
648
|
-
"client_id": client_id,
|
|
649
|
-
"redirect_uri": redirect_uri,
|
|
650
|
-
"response_type": response_type,
|
|
651
|
-
"code_challenge": code_challenge,
|
|
652
|
-
"code_challenge_method": code_challenge_method,
|
|
653
|
-
"scope": scope,
|
|
654
|
-
"state": state,
|
|
655
|
-
},
|
|
656
|
-
oauth_retrieve_authorize_params.OAuthRetrieveAuthorizeParams,
|
|
657
|
-
),
|
|
727
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
658
728
|
),
|
|
659
|
-
cast_to=
|
|
729
|
+
cast_to=OAuthRetrieveConsentResponse,
|
|
660
730
|
)
|
|
661
731
|
|
|
662
732
|
async def retrieve_jwks(
|
|
@@ -678,178 +748,110 @@ class AsyncOAuthResource(AsyncAPIResource):
|
|
|
678
748
|
cast_to=OAuthRetrieveJwksResponse,
|
|
679
749
|
)
|
|
680
750
|
|
|
681
|
-
async def token(
|
|
682
|
-
self,
|
|
683
|
-
*,
|
|
684
|
-
grant_type: Literal["client_credentials", "authorization_code", "refresh_token"],
|
|
685
|
-
client_id: str | Omit = omit,
|
|
686
|
-
client_secret: str | Omit = omit,
|
|
687
|
-
code: str | Omit = omit,
|
|
688
|
-
code_verifier: str | Omit = omit,
|
|
689
|
-
redirect_uri: str | Omit = omit,
|
|
690
|
-
refresh_token: str | Omit = omit,
|
|
691
|
-
scope: str | Omit = omit,
|
|
692
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
693
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
694
|
-
extra_headers: Headers | None = None,
|
|
695
|
-
extra_query: Query | None = None,
|
|
696
|
-
extra_body: Body | None = None,
|
|
697
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
698
|
-
) -> OAuthTokenResponse:
|
|
699
|
-
"""
|
|
700
|
-
Exchange authorization code, client credentials, or refresh token for access
|
|
701
|
-
token
|
|
702
|
-
|
|
703
|
-
Args:
|
|
704
|
-
grant_type: OAuth 2.0 grant type
|
|
705
|
-
|
|
706
|
-
client_id: OAuth client ID (if not using HTTP Basic auth)
|
|
707
|
-
|
|
708
|
-
client_secret: OAuth client secret (if not using HTTP Basic auth)
|
|
709
|
-
|
|
710
|
-
code: Authorization code (for authorization_code flow)
|
|
711
|
-
|
|
712
|
-
code_verifier: PKCE code verifier (for authorization_code flow)
|
|
713
|
-
|
|
714
|
-
redirect_uri: Redirect URI (for authorization_code flow)
|
|
715
|
-
|
|
716
|
-
refresh_token: Refresh token (for refresh_token flow)
|
|
717
|
-
|
|
718
|
-
scope: Space-separated list of requested scopes (for client_credentials)
|
|
719
|
-
|
|
720
|
-
extra_headers: Send extra headers
|
|
721
|
-
|
|
722
|
-
extra_query: Add additional query parameters to the request
|
|
723
|
-
|
|
724
|
-
extra_body: Add additional JSON properties to the request
|
|
725
|
-
|
|
726
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
727
|
-
"""
|
|
728
|
-
return await self._post(
|
|
729
|
-
"/oauth/token",
|
|
730
|
-
body=await async_maybe_transform(
|
|
731
|
-
{
|
|
732
|
-
"grant_type": grant_type,
|
|
733
|
-
"client_id": client_id,
|
|
734
|
-
"client_secret": client_secret,
|
|
735
|
-
"code": code,
|
|
736
|
-
"code_verifier": code_verifier,
|
|
737
|
-
"redirect_uri": redirect_uri,
|
|
738
|
-
"refresh_token": refresh_token,
|
|
739
|
-
"scope": scope,
|
|
740
|
-
},
|
|
741
|
-
oauth_token_params.OAuthTokenParams,
|
|
742
|
-
),
|
|
743
|
-
options=make_request_options(
|
|
744
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
745
|
-
),
|
|
746
|
-
cast_to=OAuthTokenResponse,
|
|
747
|
-
)
|
|
748
|
-
|
|
749
751
|
|
|
750
752
|
class OAuthResourceWithRawResponse:
|
|
751
753
|
def __init__(self, oauth: OAuthResource) -> None:
|
|
752
754
|
self._oauth = oauth
|
|
753
755
|
|
|
754
|
-
self.
|
|
755
|
-
oauth.
|
|
756
|
+
self.authorize = to_raw_response_wrapper(
|
|
757
|
+
oauth.authorize,
|
|
758
|
+
)
|
|
759
|
+
self.create_grant = to_raw_response_wrapper(
|
|
760
|
+
oauth.create_grant,
|
|
756
761
|
)
|
|
757
|
-
self.
|
|
758
|
-
oauth.
|
|
762
|
+
self.exchange_token = to_raw_response_wrapper(
|
|
763
|
+
oauth.exchange_token,
|
|
759
764
|
)
|
|
760
|
-
self.
|
|
761
|
-
oauth.
|
|
765
|
+
self.introspect_token = to_raw_response_wrapper(
|
|
766
|
+
oauth.introspect_token,
|
|
762
767
|
)
|
|
763
|
-
self.
|
|
764
|
-
oauth.
|
|
768
|
+
self.register_client = to_raw_response_wrapper(
|
|
769
|
+
oauth.register_client,
|
|
765
770
|
)
|
|
766
|
-
self.
|
|
767
|
-
oauth.
|
|
771
|
+
self.retrieve_consent = to_raw_response_wrapper(
|
|
772
|
+
oauth.retrieve_consent,
|
|
768
773
|
)
|
|
769
774
|
self.retrieve_jwks = to_raw_response_wrapper(
|
|
770
775
|
oauth.retrieve_jwks,
|
|
771
776
|
)
|
|
772
|
-
self.token = to_raw_response_wrapper(
|
|
773
|
-
oauth.token,
|
|
774
|
-
)
|
|
775
777
|
|
|
776
778
|
|
|
777
779
|
class AsyncOAuthResourceWithRawResponse:
|
|
778
780
|
def __init__(self, oauth: AsyncOAuthResource) -> None:
|
|
779
781
|
self._oauth = oauth
|
|
780
782
|
|
|
781
|
-
self.
|
|
782
|
-
oauth.
|
|
783
|
+
self.authorize = async_to_raw_response_wrapper(
|
|
784
|
+
oauth.authorize,
|
|
783
785
|
)
|
|
784
|
-
self.
|
|
785
|
-
oauth.
|
|
786
|
+
self.create_grant = async_to_raw_response_wrapper(
|
|
787
|
+
oauth.create_grant,
|
|
786
788
|
)
|
|
787
|
-
self.
|
|
788
|
-
oauth.
|
|
789
|
+
self.exchange_token = async_to_raw_response_wrapper(
|
|
790
|
+
oauth.exchange_token,
|
|
789
791
|
)
|
|
790
|
-
self.
|
|
791
|
-
oauth.
|
|
792
|
+
self.introspect_token = async_to_raw_response_wrapper(
|
|
793
|
+
oauth.introspect_token,
|
|
792
794
|
)
|
|
793
|
-
self.
|
|
794
|
-
oauth.
|
|
795
|
+
self.register_client = async_to_raw_response_wrapper(
|
|
796
|
+
oauth.register_client,
|
|
797
|
+
)
|
|
798
|
+
self.retrieve_consent = async_to_raw_response_wrapper(
|
|
799
|
+
oauth.retrieve_consent,
|
|
795
800
|
)
|
|
796
801
|
self.retrieve_jwks = async_to_raw_response_wrapper(
|
|
797
802
|
oauth.retrieve_jwks,
|
|
798
803
|
)
|
|
799
|
-
self.token = async_to_raw_response_wrapper(
|
|
800
|
-
oauth.token,
|
|
801
|
-
)
|
|
802
804
|
|
|
803
805
|
|
|
804
806
|
class OAuthResourceWithStreamingResponse:
|
|
805
807
|
def __init__(self, oauth: OAuthResource) -> None:
|
|
806
808
|
self._oauth = oauth
|
|
807
809
|
|
|
808
|
-
self.
|
|
809
|
-
oauth.
|
|
810
|
+
self.authorize = to_streamed_response_wrapper(
|
|
811
|
+
oauth.authorize,
|
|
812
|
+
)
|
|
813
|
+
self.create_grant = to_streamed_response_wrapper(
|
|
814
|
+
oauth.create_grant,
|
|
810
815
|
)
|
|
811
|
-
self.
|
|
812
|
-
oauth.
|
|
816
|
+
self.exchange_token = to_streamed_response_wrapper(
|
|
817
|
+
oauth.exchange_token,
|
|
813
818
|
)
|
|
814
|
-
self.
|
|
815
|
-
oauth.
|
|
819
|
+
self.introspect_token = to_streamed_response_wrapper(
|
|
820
|
+
oauth.introspect_token,
|
|
816
821
|
)
|
|
817
|
-
self.
|
|
818
|
-
oauth.
|
|
822
|
+
self.register_client = to_streamed_response_wrapper(
|
|
823
|
+
oauth.register_client,
|
|
819
824
|
)
|
|
820
|
-
self.
|
|
821
|
-
oauth.
|
|
825
|
+
self.retrieve_consent = to_streamed_response_wrapper(
|
|
826
|
+
oauth.retrieve_consent,
|
|
822
827
|
)
|
|
823
828
|
self.retrieve_jwks = to_streamed_response_wrapper(
|
|
824
829
|
oauth.retrieve_jwks,
|
|
825
830
|
)
|
|
826
|
-
self.token = to_streamed_response_wrapper(
|
|
827
|
-
oauth.token,
|
|
828
|
-
)
|
|
829
831
|
|
|
830
832
|
|
|
831
833
|
class AsyncOAuthResourceWithStreamingResponse:
|
|
832
834
|
def __init__(self, oauth: AsyncOAuthResource) -> None:
|
|
833
835
|
self._oauth = oauth
|
|
834
836
|
|
|
835
|
-
self.
|
|
836
|
-
oauth.
|
|
837
|
+
self.authorize = async_to_streamed_response_wrapper(
|
|
838
|
+
oauth.authorize,
|
|
839
|
+
)
|
|
840
|
+
self.create_grant = async_to_streamed_response_wrapper(
|
|
841
|
+
oauth.create_grant,
|
|
837
842
|
)
|
|
838
|
-
self.
|
|
839
|
-
oauth.
|
|
843
|
+
self.exchange_token = async_to_streamed_response_wrapper(
|
|
844
|
+
oauth.exchange_token,
|
|
840
845
|
)
|
|
841
|
-
self.
|
|
842
|
-
oauth.
|
|
846
|
+
self.introspect_token = async_to_streamed_response_wrapper(
|
|
847
|
+
oauth.introspect_token,
|
|
843
848
|
)
|
|
844
|
-
self.
|
|
845
|
-
oauth.
|
|
849
|
+
self.register_client = async_to_streamed_response_wrapper(
|
|
850
|
+
oauth.register_client,
|
|
846
851
|
)
|
|
847
|
-
self.
|
|
848
|
-
oauth.
|
|
852
|
+
self.retrieve_consent = async_to_streamed_response_wrapper(
|
|
853
|
+
oauth.retrieve_consent,
|
|
849
854
|
)
|
|
850
855
|
self.retrieve_jwks = async_to_streamed_response_wrapper(
|
|
851
856
|
oauth.retrieve_jwks,
|
|
852
857
|
)
|
|
853
|
-
self.token = async_to_streamed_response_wrapper(
|
|
854
|
-
oauth.token,
|
|
855
|
-
)
|