regenerate ory-hydra-client

This commit is contained in:
TuxCoder 2023-01-13 15:52:38 +01:00
parent 1947a6f24a
commit cba6cb75e5
93 changed files with 3705 additions and 1430 deletions

View file

@ -20,4 +20,4 @@ dmypy.json
.idea/
/coverage.xml
/.coverage
/.coverage

View file

@ -84,4 +84,4 @@ If you want to install this client into another project without publishing it (e
1. If that project **is using Poetry**, you can simply do `poetry add <path-to-this-client>` from that project
1. If that project is not using Poetry:
1. Build a wheel with `poetry build -f wheel`
1. Install that wheel from the other project `pip install <path-to-wheel>`
1. Install that wheel from the other project `pip install <path-to-wheel>`

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.accept_consent_request import AcceptConsentRequest
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from ...models.accept_consent_request import AcceptConsentRequest
def _get_kwargs(
@ -14,21 +18,34 @@ def _get_kwargs(
_client: Client,
json_body: AcceptConsentRequest,
consent_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent/accept".format(_client.base_url)
url = "{}/oauth2/auth/requests/consent/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -39,17 +56,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -68,6 +91,7 @@ def sync_detailed(
_client: Client,
json_body: AcceptConsentRequest,
consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request
@ -105,10 +129,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
json_body=json_body,
consent_challenge=consent_challenge,
)
response = httpx.request(
@ -118,12 +144,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: AcceptConsentRequest,
consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request
@ -161,18 +187,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
).parsed
json_body=json_body,
consent_challenge=consent_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: AcceptConsentRequest,
consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request
@ -210,23 +238,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
json_body=json_body,
consent_challenge=consent_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: AcceptConsentRequest,
consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Consent Request
@ -264,10 +296,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
)).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.accept_login_request import AcceptLoginRequest
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from ...models.accept_login_request import AcceptLoginRequest
def _get_kwargs(
@ -14,21 +18,34 @@ def _get_kwargs(
_client: Client,
json_body: AcceptLoginRequest,
login_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login/accept".format(_client.base_url)
url = "{}/oauth2/auth/requests/login/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -39,25 +56,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json())
return response_200
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -76,6 +103,7 @@ def sync_detailed(
_client: Client,
json_body: AcceptLoginRequest,
login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request
@ -108,10 +136,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
json_body=json_body,
login_challenge=login_challenge,
)
response = httpx.request(
@ -121,12 +151,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: AcceptLoginRequest,
login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request
@ -159,18 +189,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
).parsed
json_body=json_body,
login_challenge=login_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: AcceptLoginRequest,
login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request
@ -203,23 +235,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
json_body=json_body,
login_challenge=login_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: AcceptLoginRequest,
login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Login Request
@ -252,10 +288,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
)).parsed

View file

@ -1,30 +1,47 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.completed_request import CompletedRequest
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from typing import cast
from ...models.completed_request import CompletedRequest
from typing import Dict
def _get_kwargs(
*,
_client: Client,
logout_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout/accept".format(_client.base_url)
url = "{}/oauth2/auth/requests/logout/accept".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -34,17 +51,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -62,6 +85,7 @@ def sync_detailed(
*,
_client: Client,
logout_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request
@ -78,9 +102,11 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
logout_challenge=logout_challenge,
logout_challenge=logout_challenge,
)
response = httpx.request(
@ -90,11 +116,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
logout_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request
@ -111,16 +137,18 @@ def sync(
Response[Union[CompletedRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
logout_challenge=logout_challenge,
).parsed
logout_challenge=logout_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
logout_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request
@ -137,21 +165,25 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
logout_challenge=logout_challenge,
logout_challenge=logout_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
logout_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Accept a Logout Request
@ -168,9 +200,10 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
logout_challenge=logout_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
logout_challenge=logout_challenge,
)).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet
from ...models.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest
from ...types import Response
def _get_kwargs(
@ -14,16 +18,28 @@ def _get_kwargs(
*,
_client: Client,
json_body: JsonWebKeySetGeneratorRequest,
) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_)
url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -33,21 +49,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 201:
if response.status_code == HTTPStatus.CREATED:
response_201 = JSONWebKeySet.from_dict(response.json())
return response_201
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -66,6 +90,7 @@ def sync_detailed(
*,
_client: Client,
json_body: JsonWebKeySetGeneratorRequest,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key
@ -87,10 +112,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
response = httpx.request(
@ -100,12 +127,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
*,
_client: Client,
json_body: JsonWebKeySetGeneratorRequest,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key
@ -127,18 +154,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]]
"""
return sync_detailed(
set_=set_,
_client=_client,
json_body=json_body,
).parsed
_client=_client,
json_body=json_body,
).parsed
async def asyncio_detailed(
set_: str,
*,
_client: Client,
json_body: JsonWebKeySetGeneratorRequest,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key
@ -160,23 +189,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
*,
_client: Client,
json_body: JsonWebKeySetGeneratorRequest,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Generate a New JSON Web Key
@ -198,10 +231,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]]
"""
return (
await asyncio_detailed(
set_=set_,
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
set_=set_,
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,27 +1,43 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client
from ...types import Response
from typing import Dict
def _get_kwargs(
*,
_client: Client,
json_body: OAuth2Client,
) -> Dict[str, Any]:
url = "{}/clients".format(_client.base_url)
url = "{}/clients".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -31,21 +47,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 201:
if response.status_code == HTTPStatus.CREATED:
response_201 = OAuth2Client.from_dict(response.json())
return response_201
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 409:
if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json())
return response_409
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -63,6 +87,7 @@ def sync_detailed(
*,
_client: Client,
json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client
@ -82,9 +107,11 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
json_body=json_body,
)
response = httpx.request(
@ -94,11 +121,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client
@ -118,16 +145,18 @@ def sync(
Response[Union[GenericError, OAuth2Client]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
).parsed
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client
@ -147,21 +176,25 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Create an OAuth 2.0 Client
@ -181,9 +214,10 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,10 +1,14 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
@ -12,14 +16,26 @@ def _get_kwargs(
kid: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid)
url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -28,20 +44,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -60,6 +82,7 @@ def sync_detailed(
kid: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key
@ -79,10 +102,12 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
kid=kid,
_client=_client,
)
response = httpx.request(
@ -92,12 +117,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
kid: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key
@ -117,18 +142,20 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
set_=set_,
kid=kid,
_client=_client,
).parsed
kid=kid,
_client=_client,
).parsed
async def asyncio_detailed(
set_: str,
kid: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key
@ -148,23 +175,27 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
kid=kid,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
kid: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key
@ -184,10 +215,11 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
)
).parsed
return (await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
set_: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_)
url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,20 +43,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -58,6 +80,7 @@ def sync_detailed(
set_: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set
@ -76,9 +99,11 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
_client=_client,
)
response = httpx.request(
@ -88,11 +113,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set
@ -111,16 +136,18 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
set_=set_,
_client=_client,
).parsed
_client=_client,
).parsed
async def asyncio_detailed(
set_: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set
@ -139,21 +166,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Delete a JSON Web Key Set
@ -172,9 +203,10 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
set_=set_,
_client=_client,
)
).parsed
return (await asyncio_detailed(
set_=set_,
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
id: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id)
url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,16 +43,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -54,6 +74,7 @@ def sync_detailed(
id: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client
@ -71,9 +92,11 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
_client=_client,
)
response = httpx.request(
@ -83,11 +106,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
id: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client
@ -105,16 +128,18 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
id=id,
_client=_client,
).parsed
_client=_client,
).parsed
async def asyncio_detailed(
id: str,
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client
@ -132,21 +157,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
id: str,
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""Deletes an OAuth 2.0 Client
@ -164,9 +193,10 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
id=id,
_client=_client,
)
).parsed
return (await asyncio_detailed(
id=id,
_client=_client,
)).parsed

View file

@ -1,29 +1,46 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
client_id: str,
) -> Dict[str, Any]:
url = "{}/oauth2/tokens".format(_client.base_url)
url = "{}/oauth2/tokens".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["client_id"] = client_id
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -33,16 +50,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -60,6 +81,7 @@ def sync_detailed(
*,
_client: Client,
client_id: str,
) -> Response[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client
@ -72,9 +94,11 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
client_id=client_id,
client_id=client_id,
)
response = httpx.request(
@ -84,11 +108,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
client_id: str,
) -> Optional[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client
@ -101,16 +125,18 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
client_id=client_id,
).parsed
client_id=client_id,
).parsed
async def asyncio_detailed(
*,
_client: Client,
client_id: str,
) -> Response[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client
@ -123,21 +149,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
client_id=client_id,
client_id=client_id,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
client_id: str,
) -> Optional[Union[Any, GenericError]]:
"""Delete OAuth2 Access Tokens from a Client
@ -150,9 +180,10 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
client_id=client_id,
)
).parsed
return (await asyncio_detailed(
_client=_client,
client_id=client_id,
)).parsed

View file

@ -1,27 +1,43 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.flush_inactive_o_auth_2_tokens_request import FlushInactiveOAuth2TokensRequest
from ...models.generic_error import GenericError
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
json_body: FlushInactiveOAuth2TokensRequest,
) -> Dict[str, Any]:
url = "{}/oauth2/flush".format(_client.base_url)
url = "{}/oauth2/flush".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -31,16 +47,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -58,6 +78,7 @@ def sync_detailed(
*,
_client: Client,
json_body: FlushInactiveOAuth2TokensRequest,
) -> Response[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens
@ -74,9 +95,11 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
json_body=json_body,
)
response = httpx.request(
@ -86,11 +109,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: FlushInactiveOAuth2TokensRequest,
) -> Optional[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens
@ -107,16 +130,18 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
).parsed
json_body=json_body,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: FlushInactiveOAuth2TokensRequest,
) -> Response[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens
@ -133,21 +158,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: FlushInactiveOAuth2TokensRequest,
) -> Optional[Union[Any, GenericError]]:
"""Flush Expired OAuth2 Access Tokens
@ -164,9 +193,10 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,30 +1,47 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.consent_request import ConsentRequest
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from ...models.consent_request import ConsentRequest
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
consent_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent".format(_client.base_url)
url = "{}/oauth2/auth/requests/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -34,21 +51,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[ConsentRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = ConsentRequest.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 409:
if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json())
return response_409
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -66,6 +91,7 @@ def sync_detailed(
*,
_client: Client,
consent_challenge: str,
) -> Response[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information
@ -94,9 +120,11 @@ def sync_detailed(
Response[Union[ConsentRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
consent_challenge=consent_challenge,
consent_challenge=consent_challenge,
)
response = httpx.request(
@ -106,11 +134,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
consent_challenge: str,
) -> Optional[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information
@ -139,16 +167,18 @@ def sync(
Response[Union[ConsentRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
consent_challenge=consent_challenge,
).parsed
consent_challenge=consent_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
consent_challenge: str,
) -> Response[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information
@ -177,21 +207,25 @@ async def asyncio_detailed(
Response[Union[ConsentRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
consent_challenge=consent_challenge,
consent_challenge=consent_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
consent_challenge: str,
) -> Optional[Union[ConsentRequest, GenericError]]:
"""Get Consent Request Information
@ -220,9 +254,10 @@ async def asyncio(
Response[Union[ConsentRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
consent_challenge=consent_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
consent_challenge=consent_challenge,
)).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
@ -13,14 +17,26 @@ def _get_kwargs(
kid: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid)
url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -29,17 +45,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -58,6 +80,7 @@ def sync_detailed(
kid: str,
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key
@ -71,10 +94,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
kid=kid,
_client=_client,
)
response = httpx.request(
@ -84,12 +109,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
kid: str,
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key
@ -103,18 +128,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]]
"""
return sync_detailed(
set_=set_,
kid=kid,
_client=_client,
).parsed
kid=kid,
_client=_client,
).parsed
async def asyncio_detailed(
set_: str,
kid: str,
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key
@ -128,23 +155,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
kid=kid,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
kid: str,
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Fetch a JSON Web Key
@ -158,10 +189,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]]
"""
return (
await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
)
).parsed
return (await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
)).parsed

View file

@ -1,25 +1,41 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
set_: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_)
url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -28,21 +44,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -60,6 +84,7 @@ def sync_detailed(
set_: str,
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set
@ -78,9 +103,11 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
_client=_client,
)
response = httpx.request(
@ -90,11 +117,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set
@ -113,16 +140,18 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]]
"""
return sync_detailed(
set_=set_,
_client=_client,
).parsed
_client=_client,
).parsed
async def asyncio_detailed(
set_: str,
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set
@ -141,21 +170,25 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Retrieve a JSON Web Key Set
@ -174,9 +207,10 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]]
"""
return (
await asyncio_detailed(
set_=set_,
_client=_client,
)
).parsed
return (await asyncio_detailed(
set_=set_,
_client=_client,
)).parsed

View file

@ -1,30 +1,47 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.generic_error import GenericError
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.login_request import LoginRequest
from ...types import UNSET, Response
from ...models.generic_error import GenericError
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
login_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login".format(_client.base_url)
url = "{}/oauth2/auth/requests/login".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -34,25 +51,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LoginRequest]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = LoginRequest.from_dict(response.json())
return response_200
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 409:
if response.status_code == HTTPStatus.CONFLICT:
response_409 = GenericError.from_dict(response.json())
return response_409
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -70,6 +97,7 @@ def sync_detailed(
*,
_client: Client,
login_challenge: str,
) -> Response[Union[GenericError, LoginRequest]]:
"""Get a Login Request
@ -93,9 +121,11 @@ def sync_detailed(
Response[Union[GenericError, LoginRequest]]
"""
kwargs = _get_kwargs(
_client=_client,
login_challenge=login_challenge,
login_challenge=login_challenge,
)
response = httpx.request(
@ -105,11 +135,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
login_challenge: str,
) -> Optional[Union[GenericError, LoginRequest]]:
"""Get a Login Request
@ -133,16 +163,18 @@ def sync(
Response[Union[GenericError, LoginRequest]]
"""
return sync_detailed(
_client=_client,
login_challenge=login_challenge,
).parsed
login_challenge=login_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
login_challenge: str,
) -> Response[Union[GenericError, LoginRequest]]:
"""Get a Login Request
@ -166,21 +198,25 @@ async def asyncio_detailed(
Response[Union[GenericError, LoginRequest]]
"""
kwargs = _get_kwargs(
_client=_client,
login_challenge=login_challenge,
login_challenge=login_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
login_challenge: str,
) -> Optional[Union[GenericError, LoginRequest]]:
"""Get a Login Request
@ -204,9 +240,10 @@ async def asyncio(
Response[Union[GenericError, LoginRequest]]
"""
return (
await asyncio_detailed(
_client=_client,
login_challenge=login_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
login_challenge=login_challenge,
)).parsed

View file

@ -1,30 +1,47 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.logout_request import LogoutRequest
from ...types import UNSET, Response
from typing import Dict
def _get_kwargs(
*,
_client: Client,
logout_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout".format(_client.base_url)
url = "{}/oauth2/auth/requests/logout".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -34,17 +51,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LogoutRequest]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = LogoutRequest.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -62,6 +85,7 @@ def sync_detailed(
*,
_client: Client,
logout_challenge: str,
) -> Response[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request
@ -74,9 +98,11 @@ def sync_detailed(
Response[Union[GenericError, LogoutRequest]]
"""
kwargs = _get_kwargs(
_client=_client,
logout_challenge=logout_challenge,
logout_challenge=logout_challenge,
)
response = httpx.request(
@ -86,11 +112,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
logout_challenge: str,
) -> Optional[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request
@ -103,16 +129,18 @@ def sync(
Response[Union[GenericError, LogoutRequest]]
"""
return sync_detailed(
_client=_client,
logout_challenge=logout_challenge,
).parsed
logout_challenge=logout_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
logout_challenge: str,
) -> Response[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request
@ -125,21 +153,25 @@ async def asyncio_detailed(
Response[Union[GenericError, LogoutRequest]]
"""
kwargs = _get_kwargs(
_client=_client,
logout_challenge=logout_challenge,
logout_challenge=logout_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
logout_challenge: str,
) -> Optional[Union[GenericError, LogoutRequest]]:
"""Get a Logout Request
@ -152,9 +184,10 @@ async def asyncio(
Response[Union[GenericError, LogoutRequest]]
"""
return (
await asyncio_detailed(
_client=_client,
logout_challenge=logout_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
logout_challenge=logout_challenge,
)).parsed

View file

@ -1,25 +1,41 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client
from ...types import Response
from typing import Dict
def _get_kwargs(
id: str,
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id)
url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -28,17 +44,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = OAuth2Client.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -56,6 +78,7 @@ def sync_detailed(
id: str,
*,
_client: Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client.
@ -73,9 +96,11 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
_client=_client,
)
response = httpx.request(
@ -85,11 +110,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
id: str,
*,
_client: Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client.
@ -107,16 +132,18 @@ def sync(
Response[Union[GenericError, OAuth2Client]]
"""
return sync_detailed(
id=id,
_client=_client,
).parsed
_client=_client,
).parsed
async def asyncio_detailed(
id: str,
*,
_client: Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client.
@ -134,21 +161,25 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
id: str,
*,
_client: Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Get an OAuth 2.0 Client.
@ -166,9 +197,10 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]]
"""
return (
await asyncio_detailed(
id=id,
_client=_client,
)
).parsed
return (await asyncio_detailed(
id=id,
_client=_client,
)).parsed

View file

@ -1,23 +1,39 @@
from typing import Any, Dict, Optional
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.version import Version
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/version".format(_client.base_url)
url = "{}/version".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -26,9 +42,11 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Version]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = Version.from_dict(response.json())
return response_200
return None
@ -45,6 +63,7 @@ def _build_response(*, response: httpx.Response) -> Response[Version]:
def sync_detailed(
*,
_client: Client,
) -> Response[Version]:
"""Get Service Version
@ -57,8 +76,10 @@ def sync_detailed(
Response[Version]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -68,10 +89,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Version]:
"""Get Service Version
@ -84,14 +105,16 @@ def sync(
Response[Version]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Version]:
"""Get Service Version
@ -104,19 +127,23 @@ async def asyncio_detailed(
Response[Version]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Version]:
"""Get Service Version
@ -129,8 +156,9 @@ async def asyncio(
Response[Version]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,41 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.generic_error import GenericError
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.introspect_o_auth_2_token_data import IntrospectOAuth2TokenData
from ...models.o_auth_2_token_introspection import OAuth2TokenIntrospection
from ...types import Response
from typing import Dict
from typing import cast
from ...models.generic_error import GenericError
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/oauth2/introspect".format(_client.base_url)
url = "{}/oauth2/introspect".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,17 +44,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = OAuth2TokenIntrospection.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -54,6 +77,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens
@ -70,8 +94,10 @@ def sync_detailed(
Response[Union[GenericError, OAuth2TokenIntrospection]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -81,10 +107,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens
@ -101,14 +127,16 @@ def sync(
Response[Union[GenericError, OAuth2TokenIntrospection]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens
@ -125,19 +153,23 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2TokenIntrospection]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
"""Introspect OAuth2 Tokens
@ -154,8 +186,9 @@ async def asyncio(
Response[Union[GenericError, OAuth2TokenIntrospection]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...models.health_status import HealthStatus
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/health/alive".format(_client.base_url)
url = "{}/health/alive".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, HealthStatus]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = HealthStatus.from_dict(response.json())
return response_200
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, HealthStatus]]:
"""Check Alive Status
@ -66,8 +87,10 @@ def sync_detailed(
Response[Union[GenericError, HealthStatus]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -77,10 +100,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[GenericError, HealthStatus]]:
"""Check Alive Status
@ -97,14 +120,16 @@ def sync(
Response[Union[GenericError, HealthStatus]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, HealthStatus]]:
"""Check Alive Status
@ -121,19 +146,23 @@ async def asyncio_detailed(
Response[Union[GenericError, HealthStatus]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[GenericError, HealthStatus]]:
"""Check Alive Status
@ -150,8 +179,9 @@ async def asyncio(
Response[Union[GenericError, HealthStatus]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,11 +1,19 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import Union
from typing import cast
from ...types import UNSET, Unset
from ...models.generic_error import GenericError
from typing import cast, List
from ...models.o_auth_2_client import OAuth2Client
from ...types import UNSET, Response, Unset
from typing import Optional
def _get_kwargs(
@ -13,21 +21,35 @@ def _get_kwargs(
_client: Client,
limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET,
) -> Dict[str, Any]:
url = "{}/clients".format(_client.base_url)
url = "{}/clients".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["limit"] = limit
params["offset"] = offset
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -36,24 +58,28 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List[OAuth2Client]]]:
if response.status_code == 200:
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List['OAuth2Client']]]:
if response.status_code == HTTPStatus.OK:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
for response_200_item_data in (_response_200):
response_200_item = OAuth2Client.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List[OAuth2Client]]]:
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List['OAuth2Client']]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -67,7 +93,8 @@ def sync_detailed(
_client: Client,
limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET,
) -> Response[Union[GenericError, List[OAuth2Client]]]:
) -> Response[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -89,13 +116,15 @@ def sync_detailed(
offset (Union[Unset, None, int]):
Returns:
Response[Union[GenericError, List[OAuth2Client]]]
Response[Union[GenericError, List['OAuth2Client']]]
"""
kwargs = _get_kwargs(
_client=_client,
limit=limit,
offset=offset,
limit=limit,
offset=offset,
)
response = httpx.request(
@ -105,13 +134,13 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET,
) -> Optional[Union[GenericError, List[OAuth2Client]]]:
) -> Optional[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -133,22 +162,24 @@ def sync(
offset (Union[Unset, None, int]):
Returns:
Response[Union[GenericError, List[OAuth2Client]]]
Response[Union[GenericError, List['OAuth2Client']]]
"""
return sync_detailed(
_client=_client,
limit=limit,
offset=offset,
).parsed
limit=limit,
offset=offset,
).parsed
async def asyncio_detailed(
*,
_client: Client,
limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET,
) -> Response[Union[GenericError, List[OAuth2Client]]]:
) -> Response[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -170,27 +201,31 @@ async def asyncio_detailed(
offset (Union[Unset, None, int]):
Returns:
Response[Union[GenericError, List[OAuth2Client]]]
Response[Union[GenericError, List['OAuth2Client']]]
"""
kwargs = _get_kwargs(
_client=_client,
limit=limit,
offset=offset,
limit=limit,
offset=offset,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
limit: Union[Unset, None, int] = UNSET,
offset: Union[Unset, None, int] = UNSET,
) -> Optional[Union[GenericError, List[OAuth2Client]]]:
) -> Optional[Union[GenericError, List['OAuth2Client']]]:
"""List OAuth 2.0 Clients
This endpoint lists all clients in the database, and never returns client secrets. As a default it
@ -212,13 +247,14 @@ async def asyncio(
offset (Union[Unset, None, int]):
Returns:
Response[Union[GenericError, List[OAuth2Client]]]
Response[Union[GenericError, List['OAuth2Client']]]
"""
return (
await asyncio_detailed(
_client=_client,
limit=limit,
offset=offset,
)
).parsed
return (await asyncio_detailed(
_client=_client,
limit=limit,
offset=offset,
)).parsed

View file

@ -1,30 +1,48 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.generic_error import GenericError
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from ...models.previous_consent_session import PreviousConsentSession
from ...types import UNSET, Response
from typing import cast
from ...models.generic_error import GenericError
from typing import cast, List
def _get_kwargs(
*,
_client: Client,
subject: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/consent".format(_client.base_url)
url = "{}/oauth2/auth/sessions/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["subject"] = subject
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -33,28 +51,34 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List[PreviousConsentSession]]]:
if response.status_code == 200:
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
if response.status_code == HTTPStatus.OK:
response_200 = []
_response_200 = response.json()
for response_200_item_data in _response_200:
for response_200_item_data in (_response_200):
response_200_item = PreviousConsentSession.from_dict(response_200_item_data)
response_200.append(response_200_item)
return response_200
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List[PreviousConsentSession]]]:
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -67,7 +91,8 @@ def sync_detailed(
*,
_client: Client,
subject: str,
) -> Response[Union[GenericError, List[PreviousConsentSession]]]:
) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -86,12 +111,14 @@ def sync_detailed(
subject (str):
Returns:
Response[Union[GenericError, List[PreviousConsentSession]]]
Response[Union[GenericError, List['PreviousConsentSession']]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
subject=subject,
)
response = httpx.request(
@ -101,12 +128,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
subject: str,
) -> Optional[Union[GenericError, List[PreviousConsentSession]]]:
) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -125,20 +152,22 @@ def sync(
subject (str):
Returns:
Response[Union[GenericError, List[PreviousConsentSession]]]
Response[Union[GenericError, List['PreviousConsentSession']]]
"""
return sync_detailed(
_client=_client,
subject=subject,
).parsed
subject=subject,
).parsed
async def asyncio_detailed(
*,
_client: Client,
subject: str,
) -> Response[Union[GenericError, List[PreviousConsentSession]]]:
) -> Response[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -157,25 +186,29 @@ async def asyncio_detailed(
subject (str):
Returns:
Response[Union[GenericError, List[PreviousConsentSession]]]
Response[Union[GenericError, List['PreviousConsentSession']]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
subject=subject,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
subject: str,
) -> Optional[Union[GenericError, List[PreviousConsentSession]]]:
) -> Optional[Union[GenericError, List['PreviousConsentSession']]]:
"""Lists All Consent Sessions of a Subject
This endpoint lists all subject's granted consent sessions, including client and granted scope.
@ -194,12 +227,13 @@ async def asyncio(
subject (str):
Returns:
Response[Union[GenericError, List[PreviousConsentSession]]]
Response[Union[GenericError, List['PreviousConsentSession']]]
"""
return (
await asyncio_detailed(
_client=_client,
subject=subject,
)
).parsed
return (await asyncio_detailed(
_client=_client,
subject=subject,
)).parsed

View file

@ -1,22 +1,36 @@
from typing import Any, Dict
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...types import Response
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/metrics/prometheus".format(_client.base_url)
url = "{}/metrics/prometheus".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -24,6 +38,8 @@ def _get_kwargs(
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
@ -36,6 +52,7 @@ def _build_response(*, response: httpx.Response) -> Response[Any]:
def sync_detailed(
*,
_client: Client,
) -> Response[Any]:
"""Get Snapshot Metrics from the Hydra Service.
@ -55,8 +72,10 @@ def sync_detailed(
Response[Any]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -70,6 +89,7 @@ def sync_detailed(
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Any]:
"""Get Snapshot Metrics from the Hydra Service.
@ -89,11 +109,17 @@ async def asyncio_detailed(
Response[Any]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.reject_request import RejectRequest
from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError
from ...models.reject_request import RejectRequest
from ...types import UNSET, Response
def _get_kwargs(
@ -14,21 +18,34 @@ def _get_kwargs(
_client: Client,
json_body: RejectRequest,
consent_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/consent/reject".format(_client.base_url)
url = "{}/oauth2/auth/requests/consent/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["consent_challenge"] = consent_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -39,17 +56,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json())
return response_200
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -68,6 +91,7 @@ def sync_detailed(
_client: Client,
json_body: RejectRequest,
consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request
@ -103,10 +127,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
json_body=json_body,
consent_challenge=consent_challenge,
)
response = httpx.request(
@ -116,12 +142,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: RejectRequest,
consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request
@ -157,18 +183,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
).parsed
json_body=json_body,
consent_challenge=consent_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: RejectRequest,
consent_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request
@ -204,23 +232,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
json_body=json_body,
consent_challenge=consent_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: RejectRequest,
consent_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Consent Request
@ -256,10 +288,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
consent_challenge=consent_challenge,
)).parsed

View file

@ -1,12 +1,16 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import cast
from ...models.reject_request import RejectRequest
from ...models.completed_request import CompletedRequest
from ...models.generic_error import GenericError
from ...models.reject_request import RejectRequest
from ...types import UNSET, Response
def _get_kwargs(
@ -14,21 +18,34 @@ def _get_kwargs(
_client: Client,
json_body: RejectRequest,
login_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/login/reject".format(_client.base_url)
url = "{}/oauth2/auth/requests/login/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["login_challenge"] = login_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -39,25 +56,35 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = CompletedRequest.from_dict(response.json())
return response_200
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -76,6 +103,7 @@ def sync_detailed(
_client: Client,
json_body: RejectRequest,
login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request
@ -106,10 +134,12 @@ def sync_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
json_body=json_body,
login_challenge=login_challenge,
)
response = httpx.request(
@ -119,12 +149,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
json_body: RejectRequest,
login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request
@ -155,18 +185,20 @@ def sync(
Response[Union[CompletedRequest, GenericError]]
"""
return sync_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
).parsed
json_body=json_body,
login_challenge=login_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
json_body: RejectRequest,
login_challenge: str,
) -> Response[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request
@ -197,23 +229,27 @@ async def asyncio_detailed(
Response[Union[CompletedRequest, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
json_body=json_body,
login_challenge=login_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
json_body: RejectRequest,
login_challenge: str,
) -> Optional[Union[CompletedRequest, GenericError]]:
"""Reject a Login Request
@ -244,10 +280,11 @@ async def asyncio(
Response[Union[CompletedRequest, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
login_challenge=login_challenge,
)).parsed

View file

@ -1,54 +1,74 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.reject_request import RejectRequest
from ...types import UNSET, Response
from typing import Dict
def _get_kwargs(
*,
_client: Client,
form_data: RejectRequest,
json_body: RejectRequest,
logout_challenge: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/requests/logout/reject".format(_client.base_url)
url = "{}/oauth2/auth/requests/logout/reject".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["logout_challenge"] = logout_challenge
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_body.to_dict()
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": _client.get_timeout(),
"data": form_data.to_dict(),
"json": json_json_body,
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -65,9 +85,9 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed(
*,
_client: Client,
form_data: RejectRequest,
json_body: RejectRequest,
logout_challenge: str,
) -> Response[Union[Any, GenericError]]:
"""Reject a Logout Request
@ -85,11 +105,12 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
form_data=form_data,
json_body=json_body,
logout_challenge=logout_challenge,
json_body=json_body,
logout_challenge=logout_challenge,
)
response = httpx.request(
@ -99,13 +120,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
form_data: RejectRequest,
json_body: RejectRequest,
logout_challenge: str,
) -> Optional[Union[Any, GenericError]]:
"""Reject a Logout Request
@ -123,20 +143,20 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
form_data=form_data,
json_body=json_body,
logout_challenge=logout_challenge,
).parsed
json_body=json_body,
logout_challenge=logout_challenge,
).parsed
async def asyncio_detailed(
*,
_client: Client,
form_data: RejectRequest,
json_body: RejectRequest,
logout_challenge: str,
) -> Response[Union[Any, GenericError]]:
"""Reject a Logout Request
@ -154,25 +174,27 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
form_data=form_data,
json_body=json_body,
logout_challenge=logout_challenge,
json_body=json_body,
logout_challenge=logout_challenge,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
form_data: RejectRequest,
json_body: RejectRequest,
logout_challenge: str,
) -> Optional[Union[Any, GenericError]]:
"""Reject a Logout Request
@ -190,11 +212,11 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
form_data=form_data,
json_body=json_body,
logout_challenge=logout_challenge,
)
).parsed
return (await asyncio_detailed(
_client=_client,
json_body=json_body,
logout_challenge=logout_challenge,
)).parsed

View file

@ -1,29 +1,46 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import UNSET, Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
subject: str,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/login".format(_client.base_url)
url = "{}/oauth2/auth/sessions/login".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["subject"] = subject
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -33,20 +50,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -64,6 +87,7 @@ def sync_detailed(
*,
_client: Client,
subject: str,
) -> Response[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session
@ -81,9 +105,11 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
subject=subject,
)
response = httpx.request(
@ -93,11 +119,11 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
subject: str,
) -> Optional[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session
@ -115,16 +141,18 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
subject=subject,
).parsed
subject=subject,
).parsed
async def asyncio_detailed(
*,
_client: Client,
subject: str,
) -> Response[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session
@ -142,21 +170,25 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
subject=subject,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
subject: str,
) -> Optional[Union[Any, GenericError]]:
"""Invalidates All Login Sessions of a Certain User
Invalidates a Subject's Authentication Session
@ -174,9 +206,10 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
subject=subject,
)
).parsed
return (await asyncio_detailed(
_client=_client,
subject=subject,
)).parsed

View file

@ -1,10 +1,17 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from typing import Union
from typing import cast
from ...types import UNSET, Unset
from ...models.generic_error import GenericError
from ...types import UNSET, Response, Unset
from typing import Optional
def _get_kwargs(
@ -13,23 +20,38 @@ def _get_kwargs(
subject: str,
client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]:
url = "{}/oauth2/auth/sessions/consent".format(_client.base_url)
url = "{}/oauth2/auth/sessions/consent".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
params: Dict[str, Any] = {}
params["subject"] = subject
params["client"] = client
params["all"] = all_
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "delete",
"method": "delete",
"url": url,
"headers": headers,
"cookies": cookies,
@ -39,20 +61,26 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 204:
if response.status_code == HTTPStatus.NO_CONTENT:
response_204 = cast(Any, None)
return response_204
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 404:
if response.status_code == HTTPStatus.NOT_FOUND:
response_404 = GenericError.from_dict(response.json())
return response_404
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -72,6 +100,7 @@ def sync_detailed(
subject: str,
client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET,
) -> Response[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -88,11 +117,13 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
client=client,
all_=all_,
subject=subject,
client=client,
all_=all_,
)
response = httpx.request(
@ -102,13 +133,13 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
subject: str,
client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET,
) -> Optional[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -125,13 +156,14 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
subject=subject,
client=client,
all_=all_,
).parsed
subject=subject,
client=client,
all_=all_,
).parsed
async def asyncio_detailed(
*,
@ -139,6 +171,7 @@ async def asyncio_detailed(
subject: str,
client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET,
) -> Response[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -155,25 +188,29 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
subject=subject,
client=client,
all_=all_,
subject=subject,
client=client,
all_=all_,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
subject: str,
client: Union[Unset, None, str] = UNSET,
all_: Union[Unset, None, bool] = UNSET,
) -> Optional[Union[Any, GenericError]]:
"""Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
@ -190,11 +227,12 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
subject=subject,
client=client,
all_=all_,
)
).parsed
return (await asyncio_detailed(
_client=_client,
subject=subject,
client=client,
all_=all_,
)).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.json_web_key import JSONWebKey
from ...types import Response
from typing import Dict
def _get_kwargs(
@ -14,16 +18,28 @@ def _get_kwargs(
*,
_client: Client,
json_body: JSONWebKey,
) -> Dict[str, Any]:
url = "{}/keys/{set}/{kid}".format(_client.base_url, set=set_, kid=kid)
url = "{}/keys/{set}/{kid}".format(
_client.base_url,set=set_,kid=kid)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -33,21 +49,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKey]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKey.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -67,6 +91,7 @@ def sync_detailed(
*,
_client: Client,
json_body: JSONWebKey,
) -> Response[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key
@ -90,11 +115,13 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKey]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
json_body=json_body,
kid=kid,
_client=_client,
json_body=json_body,
)
response = httpx.request(
@ -104,13 +131,13 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
kid: str,
*,
_client: Client,
json_body: JSONWebKey,
) -> Optional[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key
@ -134,13 +161,14 @@ def sync(
Response[Union[GenericError, JSONWebKey]]
"""
return sync_detailed(
set_=set_,
kid=kid,
_client=_client,
json_body=json_body,
).parsed
kid=kid,
_client=_client,
json_body=json_body,
).parsed
async def asyncio_detailed(
set_: str,
@ -148,6 +176,7 @@ async def asyncio_detailed(
*,
_client: Client,
json_body: JSONWebKey,
) -> Response[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key
@ -171,25 +200,29 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKey]]
"""
kwargs = _get_kwargs(
set_=set_,
kid=kid,
_client=_client,
json_body=json_body,
kid=kid,
_client=_client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
kid: str,
*,
_client: Client,
json_body: JSONWebKey,
) -> Optional[Union[GenericError, JSONWebKey]]:
"""Update a JSON Web Key
@ -213,11 +246,12 @@ async def asyncio(
Response[Union[GenericError, JSONWebKey]]
"""
return (
await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
set_=set_,
kid=kid,
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import Dict
from typing import cast
from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response
def _get_kwargs(
@ -13,16 +17,28 @@ def _get_kwargs(
*,
_client: Client,
json_body: JSONWebKeySet,
) -> Dict[str, Any]:
url = "{}/keys/{set}".format(_client.base_url, set=set_)
url = "{}/keys/{set}".format(
_client.base_url,set=set_)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -32,21 +48,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 403:
if response.status_code == HTTPStatus.FORBIDDEN:
response_403 = GenericError.from_dict(response.json())
return response_403
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -65,6 +89,7 @@ def sync_detailed(
*,
_client: Client,
json_body: JSONWebKeySet,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set
@ -90,10 +115,12 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
response = httpx.request(
@ -103,12 +130,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
set_: str,
*,
_client: Client,
json_body: JSONWebKeySet,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set
@ -134,18 +161,20 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]]
"""
return sync_detailed(
set_=set_,
_client=_client,
json_body=json_body,
).parsed
_client=_client,
json_body=json_body,
).parsed
async def asyncio_detailed(
set_: str,
*,
_client: Client,
json_body: JSONWebKeySet,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set
@ -171,23 +200,27 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
set_=set_,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
set_: str,
*,
_client: Client,
json_body: JSONWebKeySet,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""Update a JSON Web Key Set
@ -213,10 +246,11 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]]
"""
return (
await asyncio_detailed(
set_=set_,
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
set_=set_,
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,11 +1,15 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import cast
from ...models.o_auth_2_client import OAuth2Client
from ...types import Response
from typing import Dict
def _get_kwargs(
@ -13,16 +17,28 @@ def _get_kwargs(
*,
_client: Client,
json_body: OAuth2Client,
) -> Dict[str, Any]:
url = "{}/clients/{id}".format(_client.base_url, id=id)
url = "{}/clients/{id}".format(
_client.base_url,id=id)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "put",
"method": "put",
"url": url,
"headers": headers,
"cookies": cookies,
@ -32,13 +48,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = OAuth2Client.from_dict(response.json())
return response_200
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -57,6 +77,7 @@ def sync_detailed(
*,
_client: Client,
json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client
@ -77,10 +98,12 @@ def sync_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
response = httpx.request(
@ -90,12 +113,12 @@ def sync_detailed(
return _build_response(response=response)
def sync(
id: str,
*,
_client: Client,
json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client
@ -116,18 +139,20 @@ def sync(
Response[Union[GenericError, OAuth2Client]]
"""
return sync_detailed(
id=id,
_client=_client,
json_body=json_body,
).parsed
_client=_client,
json_body=json_body,
).parsed
async def asyncio_detailed(
id: str,
*,
_client: Client,
json_body: OAuth2Client,
) -> Response[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client
@ -148,23 +173,27 @@ async def asyncio_detailed(
Response[Union[GenericError, OAuth2Client]]
"""
kwargs = _get_kwargs(
id=id,
_client=_client,
json_body=json_body,
_client=_client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
id: str,
*,
_client: Client,
json_body: OAuth2Client,
) -> Optional[Union[GenericError, OAuth2Client]]:
"""Update an OAuth 2.0 Client
@ -185,10 +214,11 @@ async def asyncio(
Response[Union[GenericError, OAuth2Client]]
"""
return (
await asyncio_detailed(
id=id,
_client=_client,
json_body=json_body,
)
).parsed
return (await asyncio_detailed(
id=id,
_client=_client,
json_body=json_body,
)).parsed

View file

@ -1,22 +1,36 @@
from typing import Any, Dict
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...types import Response
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/oauth2/sessions/logout".format(_client.base_url)
url = "{}/oauth2/sessions/logout".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -24,6 +38,8 @@ def _get_kwargs(
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
@ -36,6 +52,7 @@ def _build_response(*, response: httpx.Response) -> Response[Any]:
def sync_detailed(
*,
_client: Client,
) -> Response[Any]:
"""OpenID Connect Front-Backchannel Enabled Logout
@ -49,8 +66,10 @@ def sync_detailed(
Response[Any]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -64,6 +83,7 @@ def sync_detailed(
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Any]:
"""OpenID Connect Front-Backchannel Enabled Logout
@ -77,11 +97,17 @@ async def asyncio_detailed(
Response[Any]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from typing import Dict
from typing import cast
from ...models.well_known import WellKnown
from ...types import Response
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/.well-known/openid-configuration".format(_client.base_url)
url = "{}/.well-known/openid-configuration".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,17 +43,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, WellKnown]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = WellKnown.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -54,6 +76,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery
@ -71,8 +94,10 @@ def sync_detailed(
Response[Union[GenericError, WellKnown]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -82,10 +107,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery
@ -103,14 +128,16 @@ def sync(
Response[Union[GenericError, WellKnown]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery
@ -128,19 +155,23 @@ async def asyncio_detailed(
Response[Union[GenericError, WellKnown]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[GenericError, WellKnown]]:
"""OpenID Connect Discovery
@ -158,8 +189,9 @@ async def asyncio(
Response[Union[GenericError, WellKnown]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...models.health_not_ready_status import HealthNotReadyStatus
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.health_status import HealthStatus
from ...types import Response
from typing import cast
from ...models.health_not_ready_status import HealthNotReadyStatus
from typing import Dict
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/health/ready".format(_client.base_url)
url = "{}/health/ready".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = HealthStatus.from_dict(response.json())
return response_200
if response.status_code == 503:
if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE:
response_503 = HealthNotReadyStatus.from_dict(response.json())
return response_503
return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[HealthNotRead
def sync_detailed(
*,
_client: Client,
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status
@ -67,8 +88,10 @@ def sync_detailed(
Response[Union[HealthNotReadyStatus, HealthStatus]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -78,10 +101,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status
@ -99,14 +122,16 @@ def sync(
Response[Union[HealthNotReadyStatus, HealthStatus]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status
@ -124,19 +149,23 @@ async def asyncio_detailed(
Response[Union[HealthNotReadyStatus, HealthStatus]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
"""Check Readiness Status
@ -154,8 +183,9 @@ async def asyncio(
Response[Union[HealthNotReadyStatus, HealthStatus]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,41 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import AuthenticatedClient
from ...models.generic_error import GenericError
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from typing import Dict
from ...models.oauth_2_token_response import Oauth2TokenResponse
from ...types import Response
from typing import cast
from ...models.oauth_2_token_data import Oauth2TokenData
from ...models.generic_error import GenericError
def _get_kwargs(
*,
_client: AuthenticatedClient,
) -> Dict[str, Any]:
url = "{}/oauth2/token".format(_client.base_url)
url = "{}/oauth2/token".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,21 +44,29 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = Oauth2TokenResponse.from_dict(response.json())
return response_200
if response.status_code == 400:
if response.status_code == HTTPStatus.BAD_REQUEST:
response_400 = GenericError.from_dict(response.json())
return response_400
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -58,6 +83,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint
@ -76,8 +102,10 @@ def sync_detailed(
Response[Union[GenericError, Oauth2TokenResponse]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -87,10 +115,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: AuthenticatedClient,
) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint
@ -109,14 +137,16 @@ def sync(
Response[Union[GenericError, Oauth2TokenResponse]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint
@ -135,19 +165,23 @@ async def asyncio_detailed(
Response[Union[GenericError, Oauth2TokenResponse]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: AuthenticatedClient,
) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
"""The OAuth 2.0 Token Endpoint
@ -166,8 +200,9 @@ async def asyncio(
Response[Union[GenericError, Oauth2TokenResponse]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,23 +1,39 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/oauth2/auth".format(_client.base_url)
url = "{}/oauth2/auth".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -26,16 +42,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 302:
if response.status_code == HTTPStatus.FOUND:
response_302 = cast(Any, None)
return response_302
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -52,6 +72,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed(
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint
@ -65,8 +86,10 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -76,10 +99,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint
@ -93,14 +116,16 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint
@ -114,19 +139,23 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[Any, GenericError]]:
"""The OAuth 2.0 Authorize Endpoint
@ -140,8 +169,9 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,23 +1,40 @@
from typing import Any, Dict, Optional, Union, cast
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import AuthenticatedClient
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...types import Response
from ...models.revoke_o_auth_2_token_data import RevokeOAuth2TokenData
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: AuthenticatedClient,
) -> Dict[str, Any]:
url = "{}/oauth2/revoke".format(_client.base_url)
url = "{}/oauth2/revoke".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "post",
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
@ -26,16 +43,20 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = cast(Any, None)
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -52,6 +73,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, GenericE
def sync_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens
@ -67,8 +89,10 @@ def sync_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -78,10 +102,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: AuthenticatedClient,
) -> Optional[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens
@ -97,14 +121,16 @@ def sync(
Response[Union[Any, GenericError]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens
@ -120,19 +146,23 @@ async def asyncio_detailed(
Response[Union[Any, GenericError]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: AuthenticatedClient,
) -> Optional[Union[Any, GenericError]]:
"""Revoke OAuth2 Tokens
@ -148,8 +178,9 @@ async def asyncio(
Response[Union[Any, GenericError]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import AuthenticatedClient
from ...models.generic_error import GenericError
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.userinfo_response import UserinfoResponse
from ...types import Response
from ...models.generic_error import GenericError
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: AuthenticatedClient,
) -> Dict[str, Any]:
url = "{}/userinfo".format(_client.base_url)
url = "{}/userinfo".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,17 +43,23 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, UserinfoResponse]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = UserinfoResponse.from_dict(response.json())
return response_200
if response.status_code == 401:
if response.status_code == HTTPStatus.UNAUTHORIZED:
response_401 = GenericError.from_dict(response.json())
return response_401
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -54,6 +76,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo
@ -67,8 +90,10 @@ def sync_detailed(
Response[Union[GenericError, UserinfoResponse]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -78,10 +103,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: AuthenticatedClient,
) -> Optional[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo
@ -95,14 +120,16 @@ def sync(
Response[Union[GenericError, UserinfoResponse]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: AuthenticatedClient,
) -> Response[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo
@ -116,19 +143,23 @@ async def asyncio_detailed(
Response[Union[GenericError, UserinfoResponse]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: AuthenticatedClient,
) -> Optional[Union[GenericError, UserinfoResponse]]:
"""OpenID Connect Userinfo
@ -142,8 +173,9 @@ async def asyncio(
Response[Union[GenericError, UserinfoResponse]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,24 +1,40 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ...client import Client
from ...client import AuthenticatedClient, Client
from ...types import Response, UNSET
from ...models.generic_error import GenericError
from ...models.json_web_key_set import JSONWebKeySet
from ...types import Response
from typing import cast
from typing import Dict
def _get_kwargs(
*,
_client: Client,
) -> Dict[str, Any]:
url = "{}/.well-known/jwks.json".format(_client.base_url)
url = "{}/.well-known/jwks.json".format(
_client.base_url)
headers: Dict[str, str] = _client.get_headers()
cookies: Dict[str, Any] = _client.get_cookies()
return {
"method": "get",
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
@ -27,13 +43,17 @@ def _get_kwargs(
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
if response.status_code == 200:
if response.status_code == HTTPStatus.OK:
response_200 = JSONWebKeySet.from_dict(response.json())
return response_200
if response.status_code == 500:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
response_500 = GenericError.from_dict(response.json())
return response_500
return None
@ -50,6 +70,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[GenericError,
def sync_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery
@ -62,8 +83,10 @@ def sync_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
_client=_client,
)
response = httpx.request(
@ -73,10 +96,10 @@ def sync_detailed(
return _build_response(response=response)
def sync(
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery
@ -89,14 +112,16 @@ def sync(
Response[Union[GenericError, JSONWebKeySet]]
"""
return sync_detailed(
_client=_client,
).parsed
).parsed
async def asyncio_detailed(
*,
_client: Client,
) -> Response[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery
@ -109,19 +134,23 @@ async def asyncio_detailed(
Response[Union[GenericError, JSONWebKeySet]]
"""
kwargs = _get_kwargs(
_client=_client,
)
async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
response = await __client.request(**kwargs)
response = await __client.request(
**kwargs
)
return _build_response(response=response)
async def asyncio(
*,
_client: Client,
) -> Optional[Union[GenericError, JSONWebKeySet]]:
"""JSON Web Keys Discovery
@ -134,8 +163,9 @@ async def asyncio(
Response[Union[GenericError, JSONWebKeySet]]
"""
return (
await asyncio_detailed(
_client=_client,
)
).parsed
return (await asyncio_detailed(
_client=_client,
)).parsed

View file

@ -1,12 +1,10 @@
import ssl
from typing import Dict, Union
import attr
@attr.s(auto_attribs=True)
class Client:
"""A class for keeping track of data related to the API"""
""" A class for keeping track of data related to the API """
base_url: str
cookies: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
@ -15,34 +13,33 @@ class Client:
verify_ssl: Union[str, bool, ssl.SSLContext] = attr.ib(True, kw_only=True)
def get_headers(self) -> Dict[str, str]:
"""Get headers to be used in all endpoints"""
""" Get headers to be used in all endpoints """
return {**self.headers}
def with_headers(self, headers: Dict[str, str]) -> "Client":
"""Get a new client matching this one with additional headers"""
""" Get a new client matching this one with additional headers """
return attr.evolve(self, headers={**self.headers, **headers})
def get_cookies(self) -> Dict[str, str]:
return {**self.cookies}
def with_cookies(self, cookies: Dict[str, str]) -> "Client":
"""Get a new client matching this one with additional cookies"""
""" Get a new client matching this one with additional cookies """
return attr.evolve(self, cookies={**self.cookies, **cookies})
def get_timeout(self) -> float:
return self.timeout
def with_timeout(self, timeout: float) -> "Client":
"""Get a new client matching this one with a new timeout (in seconds)"""
""" Get a new client matching this one with a new timeout (in seconds) """
return attr.evolve(self, timeout=timeout)
@attr.s(auto_attribs=True)
class AuthenticatedClient(Client):
"""A Client which has been authenticated for use on secured endpoints"""
""" A Client which has been authenticated for use on secured endpoints """
token: str
def get_headers(self) -> Dict[str, str]:
"""Get headers to be used in authenticated endpoints"""
""" Get headers to be used in authenticated endpoints """
return {"Authorization": f"Bearer {self.token}", **self.headers}

View file

@ -0,0 +1,7 @@
""" Contains shared errors types that can be raised from API functions """
class UnexpectedStatus(Exception):
""" Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True """
...
__all__ = ["UnexpectedStatus"]

View file

@ -13,6 +13,7 @@ from .generic_error import GenericError
from .health_not_ready_status import HealthNotReadyStatus
from .health_not_ready_status_errors import HealthNotReadyStatusErrors
from .health_status import HealthStatus
from .introspect_o_auth_2_token_data import IntrospectOAuth2TokenData
from .jose_json_web_key_set import JoseJSONWebKeySet
from .json_raw_message import JSONRawMessage
from .json_web_key import JSONWebKey
@ -23,6 +24,7 @@ from .logout_request import LogoutRequest
from .o_auth_2_client import OAuth2Client
from .o_auth_2_token_introspection import OAuth2TokenIntrospection
from .o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from .oauth_2_token_data import Oauth2TokenData
from .oauth_2_token_response import Oauth2TokenResponse
from .open_id_connect_context import OpenIDConnectContext
from .open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
@ -40,6 +42,7 @@ from .plugin_mount import PluginMount
from .plugin_settings import PluginSettings
from .previous_consent_session import PreviousConsentSession
from .reject_request import RejectRequest
from .revoke_o_auth_2_token_data import RevokeOAuth2TokenData
from .userinfo_response import UserinfoResponse
from .version import Version
from .volume_usage_data import VolumeUsageData

View file

@ -1,15 +1,25 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from dateutil.parser import isoparse
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptConsentRequest")
from dateutil.parser import isoparse
from typing import Dict
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="AcceptConsentRequest")
@attr.s(auto_attribs=True)
class AcceptConsentRequest:
"""
@ -31,18 +41,25 @@ class AcceptConsentRequest:
handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET
session: Union[Unset, 'ConsentRequestSession'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
grant_access_token_audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat()
@ -53,9 +70,11 @@ class AcceptConsentRequest:
if not isinstance(self.session, Unset):
session = self.session.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if grant_access_token_audience is not UNSET:
field_dict["grant_access_token_audience"] = grant_access_token_audience
if grant_scope is not UNSET:
@ -71,31 +90,41 @@ class AcceptConsentRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset):
if isinstance(_handled_at, Unset):
handled_at = UNSET
else:
handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET)
_session = _d.pop("session", UNSET)
session: Union[Unset, ConsentRequestSession]
if isinstance(_session, Unset):
if isinstance(_session, Unset):
session = UNSET
else:
session = ConsentRequestSession.from_dict(_session)
accept_consent_request = cls(
grant_access_token_audience=grant_access_token_audience,
grant_scope=grant_scope,

View file

@ -1,13 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset
T = TypeVar("T", bound="AcceptLoginRequest")
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="AcceptLoginRequest")
@attr.s(auto_attribs=True)
class AcceptLoginRequest:
"""
@ -49,12 +58,13 @@ class AcceptLoginRequest:
subject: str
acr: Union[Unset, str] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET
context: Union[Unset, 'JSONRawMessage'] = UNSET
force_subject_identifier: Union[Unset, str] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
subject = self.subject
acr = self.acr
@ -68,11 +78,9 @@ class AcceptLoginRequest:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"subject": subject,
}
)
field_dict.update({
"subject": subject,
})
if acr is not UNSET:
field_dict["acr"] = acr
if context is not UNSET:
@ -86,6 +94,8 @@ class AcceptLoginRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -95,11 +105,14 @@ class AcceptLoginRequest:
_context = _d.pop("context", UNSET)
context: Union[Unset, JSONRawMessage]
if isinstance(_context, Unset):
if isinstance(_context, Unset):
context = UNSET
else:
context = JSONRawMessage.from_dict(_context)
force_subject_identifier = _d.pop("force_subject_identifier", UNSET)
remember = _d.pop("remember", UNSET)

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="CompletedRequest")
from ..types import UNSET, Unset
T = TypeVar("T", bound="CompletedRequest")
@attr.s(auto_attribs=True)
class CompletedRequest:
"""
@ -16,19 +24,20 @@ class CompletedRequest:
redirect_to: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
redirect_to = self.redirect_to
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"redirect_to": redirect_to,
}
)
field_dict.update({
"redirect_to": redirect_to,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,15 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.json_raw_message import JSONRawMessage
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequest")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="ConsentRequest")
@attr.s(auto_attribs=True)
class ConsentRequest:
"""
@ -50,11 +58,11 @@ class ConsentRequest:
challenge: str
acr: Union[Unset, str] = UNSET
client: Union[Unset, OAuth2Client] = UNSET
context: Union[Unset, JSONRawMessage] = UNSET
client: Union[Unset, 'OAuth2Client'] = UNSET
context: Union[Unset, 'JSONRawMessage'] = UNSET
login_challenge: Union[Unset, str] = UNSET
login_session_id: Union[Unset, str] = UNSET
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET
oidc_context: Union[Unset, 'OpenIDConnectContext'] = UNSET
request_url: Union[Unset, str] = UNSET
requested_access_token_audience: Union[Unset, List[str]] = UNSET
requested_scope: Union[Unset, List[str]] = UNSET
@ -62,6 +70,7 @@ class ConsentRequest:
subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge
acr = self.acr
@ -84,20 +93,24 @@ class ConsentRequest:
if not isinstance(self.requested_access_token_audience, Unset):
requested_access_token_audience = self.requested_access_token_audience
requested_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.requested_scope, Unset):
requested_scope = self.requested_scope
skip = self.skip
subject = self.subject
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"challenge": challenge,
}
)
field_dict.update({
"challenge": challenge,
})
if acr is not UNSET:
field_dict["acr"] = acr
if client is not UNSET:
@ -123,6 +136,8 @@ class ConsentRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -132,35 +147,46 @@ class ConsentRequest:
_client = _d.pop("client", UNSET)
client: Union[Unset, OAuth2Client]
if isinstance(_client, Unset):
if isinstance(_client, Unset):
client = UNSET
else:
client = OAuth2Client.from_dict(_client)
_context = _d.pop("context", UNSET)
context: Union[Unset, JSONRawMessage]
if isinstance(_context, Unset):
if isinstance(_context, Unset):
context = UNSET
else:
context = JSONRawMessage.from_dict(_context)
login_challenge = _d.pop("login_challenge", UNSET)
login_session_id = _d.pop("login_session_id", UNSET)
_oidc_context = _d.pop("oidc_context", UNSET)
oidc_context: Union[Unset, OpenIDConnectContext]
if isinstance(_oidc_context, Unset):
if isinstance(_oidc_context, Unset):
oidc_context = UNSET
else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
request_url = _d.pop("request_url", UNSET)
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience", UNSET))
requested_scope = cast(List[str], _d.pop("requested_scope", UNSET))
skip = _d.pop("skip", UNSET)
subject = _d.pop("subject", UNSET)

View file

@ -1,14 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.consent_request_session_access_token import ConsentRequestSessionAccessToken
from ..models.consent_request_session_id_token import ConsentRequestSessionIdToken
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSession")
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="ConsentRequestSession")
@attr.s(auto_attribs=True)
class ConsentRequestSession:
"""
@ -24,10 +32,11 @@ class ConsentRequestSession:
by anyone that has access to the ID Challenge. Use with care!
"""
access_token: Union[Unset, ConsentRequestSessionAccessToken] = UNSET
id_token: Union[Unset, ConsentRequestSessionIdToken] = UNSET
access_token: Union[Unset, 'ConsentRequestSessionAccessToken'] = UNSET
id_token: Union[Unset, 'ConsentRequestSessionIdToken'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
access_token: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.access_token, Unset):
@ -37,9 +46,11 @@ class ConsentRequestSession:
if not isinstance(self.id_token, Unset):
id_token = self.id_token.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if access_token is not UNSET:
field_dict["access_token"] = access_token
if id_token is not UNSET:
@ -47,23 +58,31 @@ class ConsentRequestSession:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_access_token = _d.pop("access_token", UNSET)
access_token: Union[Unset, ConsentRequestSessionAccessToken]
if isinstance(_access_token, Unset):
if isinstance(_access_token, Unset):
access_token = UNSET
else:
access_token = ConsentRequestSessionAccessToken.from_dict(_access_token)
_id_token = _d.pop("id_token", UNSET)
id_token: Union[Unset, ConsentRequestSessionIdToken]
if isinstance(_id_token, Unset):
if isinstance(_id_token, Unset):
id_token = UNSET
else:
id_token = ConsentRequestSessionIdToken.from_dict(_id_token)
consent_request_session = cls(
access_token=access_token,
id_token=id_token,

View file

@ -1,33 +1,46 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="ConsentRequestSessionAccessToken")
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSessionAccessToken")
@attr.s(auto_attribs=True)
class ConsentRequestSessionAccessToken:
"""AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the
refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.
If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties
can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.
If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties
can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
consent_request_session_access_token = cls()
consent_request_session_access_token = cls(
)
consent_request_session_access_token.additional_properties = _d
return consent_request_session_access_token

View file

@ -1,31 +1,44 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="ConsentRequestSessionIdToken")
from ..types import UNSET, Unset
T = TypeVar("T", bound="ConsentRequestSessionIdToken")
@attr.s(auto_attribs=True)
class ConsentRequestSessionIdToken:
"""IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable
by anyone that has access to the ID Challenge. Use with care!
by anyone that has access to the ID Challenge. Use with care!
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
consent_request_session_id_token = cls()
consent_request_session_id_token = cls(
)
consent_request_session_id_token.additional_properties = _d
return consent_request_session_id_token

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="ContainerWaitOKBodyError")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="ContainerWaitOKBodyError")
@attr.s(auto_attribs=True)
class ContainerWaitOKBodyError:
"""ContainerWaitOKBodyError container waiting error, if any
@ -18,17 +26,21 @@ class ContainerWaitOKBodyError:
message: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
message = self.message
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if message is not UNSET:
field_dict["Message"] = message
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,14 +1,23 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from dateutil.parser import isoparse
from ..types import UNSET, Unset
T = TypeVar("T", bound="FlushInactiveOAuth2TokensRequest")
from dateutil.parser import isoparse
from typing import Union
from typing import cast
from ..types import UNSET, Unset
import datetime
T = TypeVar("T", bound="FlushInactiveOAuth2TokensRequest")
@attr.s(auto_attribs=True)
class FlushInactiveOAuth2TokensRequest:
"""
@ -21,29 +30,37 @@ class FlushInactiveOAuth2TokensRequest:
not_after: Union[Unset, datetime.datetime] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
not_after: Union[Unset, str] = UNSET
if not isinstance(self.not_after, Unset):
not_after = self.not_after.isoformat()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if not_after is not UNSET:
field_dict["notAfter"] = not_after
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_not_after = _d.pop("notAfter", UNSET)
not_after: Union[Unset, datetime.datetime]
if isinstance(_not_after, Unset):
if isinstance(_not_after, Unset):
not_after = UNSET
else:
not_after = isoparse(_not_after)
flush_inactive_o_auth_2_tokens_request = cls(
not_after=not_after,
)

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="GenericError")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="GenericError")
@attr.s(auto_attribs=True)
class GenericError:
"""Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.
@ -26,6 +34,7 @@ class GenericError:
status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
error = self.error
debug = self.debug
@ -34,11 +43,9 @@ class GenericError:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"error": error,
}
)
field_dict.update({
"error": error,
})
if debug is not UNSET:
field_dict["debug"] = debug
if error_description is not UNSET:
@ -48,6 +55,8 @@ class GenericError:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,13 +1,22 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.health_not_ready_status_errors import HealthNotReadyStatusErrors
from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthNotReadyStatus")
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import Dict
T = TypeVar("T", bound="HealthNotReadyStatus")
@attr.s(auto_attribs=True)
class HealthNotReadyStatus:
"""
@ -16,32 +25,40 @@ class HealthNotReadyStatus:
status.
"""
errors: Union[Unset, HealthNotReadyStatusErrors] = UNSET
errors: Union[Unset, 'HealthNotReadyStatusErrors'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
errors: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.errors, Unset):
errors = self.errors.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if errors is not UNSET:
field_dict["errors"] = errors
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_errors = _d.pop("errors", UNSET)
errors: Union[Unset, HealthNotReadyStatusErrors]
if isinstance(_errors, Unset):
if isinstance(_errors, Unset):
errors = UNSET
else:
errors = HealthNotReadyStatusErrors.from_dict(_errors)
health_not_ready_status = cls(
errors=errors,
)

View file

@ -1,28 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="HealthNotReadyStatusErrors")
from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthNotReadyStatusErrors")
@attr.s(auto_attribs=True)
class HealthNotReadyStatusErrors:
"""Errors contains a list of errors that caused the not ready status."""
"""Errors contains a list of errors that caused the not ready status.
"""
additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
health_not_ready_status_errors = cls()
health_not_ready_status_errors = cls(
)
health_not_ready_status_errors.additional_properties = _d
return health_not_ready_status_errors

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="HealthStatus")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="HealthStatus")
@attr.s(auto_attribs=True)
class HealthStatus:
"""
@ -17,17 +25,21 @@ class HealthStatus:
status: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
status = self.status
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if status is not UNSET:
field_dict["status"] = status
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -0,0 +1,81 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="IntrospectOAuth2TokenData")
@attr.s(auto_attribs=True)
class IntrospectOAuth2TokenData:
"""
Attributes:
token (str): The string value of the token. For access tokens, this
is the "access_token" value returned from the token endpoint
defined in OAuth 2.0. For refresh tokens, this is the "refresh_token"
value returned.
scope (Union[Unset, str]): An optional, space separated list of required scopes. If the access token was not
granted one of the
scopes, the result of active will be false.
"""
token: str
scope: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
token = self.token
scope = self.scope
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"token": token,
})
if scope is not UNSET:
field_dict["scope"] = scope
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
token = _d.pop("token")
scope = _d.pop("scope", UNSET)
introspect_o_auth_2_token_data = cls(
token=token,
scope=scope,
)
introspect_o_auth_2_token_data.additional_properties = _d
return introspect_o_auth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,28 +1,42 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="JoseJSONWebKeySet")
from ..types import UNSET, Unset
T = TypeVar("T", bound="JoseJSONWebKeySet")
@attr.s(auto_attribs=True)
class JoseJSONWebKeySet:
""" """
"""
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
jose_json_web_key_set = cls()
jose_json_web_key_set = cls(
)
jose_json_web_key_set.additional_properties = _d
return jose_json_web_key_set

View file

@ -1,28 +1,42 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="JSONRawMessage")
from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONRawMessage")
@attr.s(auto_attribs=True)
class JSONRawMessage:
""" """
"""
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
json_raw_message = cls()
json_raw_message = cls(
)
json_raw_message.additional_properties = _d
return json_raw_message

View file

@ -1,83 +1,92 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKey")
from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="JSONWebKey")
@attr.s(auto_attribs=True)
class JSONWebKey:
"""It is important that this model object is named JSONWebKey for
"swagger generate spec" to generate only on definition of a
JSONWebKey.
"swagger generate spec" to generate only on definition of a
JSONWebKey.
Attributes:
alg (str): The "alg" (algorithm) parameter identifies the algorithm intended for
use with the key. The values used should either be registered in the
IANA "JSON Web Signature and Encryption Algorithms" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. Example: RS256.
kid (str): The "kid" (key ID) parameter is used to match a specific key. This
is used, for instance, to choose among a set of keys within a JWK Set
during key rollover. The structure of the "kid" value is
unspecified. When "kid" values are used within a JWK Set, different
keys within the JWK Set SHOULD use distinct "kid" values. (One
example in which different keys might use the same "kid" value is if
they have different "kty" (key type) values but are considered to be
equivalent alternatives by the application using them.) The "kid"
value is a case-sensitive string. Example: 1603dfe0af8f4596.
kty (str): The "kty" (key type) parameter identifies the cryptographic algorithm
family used with the key, such as "RSA" or "EC". "kty" values should
either be registered in the IANA "JSON Web Key Types" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. The "kty" value is a case-sensitive string. Example: RSA.
use (str): Use ("public key use") identifies the intended use of
the public key. The "use" parameter is employed to indicate whether
a public key is used for encrypting data or verifying the signature
on data. Values are commonly "sig" (signature) or "enc" (encryption). Example: sig.
crv (Union[Unset, str]): Example: P-256.
d (Union[Unset, str]): Example:
T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-
TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-
xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS
4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-
ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpg
NKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYV
WFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE.
dp (Union[Unset, str]): Example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ
4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0.
dq (Union[Unset, str]): Example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF
7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk.
e (Union[Unset, str]): Example: AQAB.
k (Union[Unset, str]): Example: GawgguFyGrWKav7AX4VKUg.
n (Union[Unset, str]): Example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4J
zruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJL
BWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yF
p_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUX
t23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCF
DMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-
KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0.
p (Union[Unset, str]): Example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2
i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmS
eMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0
Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ.
q (Union[Unset, str]): Example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-
ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-
uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y
0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ.
qi (Union[Unset, str]): Example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-
Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU.
x (Union[Unset, str]): Example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU.
x5c (Union[Unset, List[str]]): The "x5c" (X.509 certificate chain) parameter contains a chain of one
or more PKIX certificates [RFC5280]. The certificate chain is
represented as a JSON array of certificate value strings. Each
string in the array is a base64-encoded (Section 4 of [RFC4648] --
not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.
The PKIX certificate containing the key value MUST be the first
certificate.
y (Union[Unset, str]): Example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0.
Attributes:
alg (str): The "alg" (algorithm) parameter identifies the algorithm intended for
use with the key. The values used should either be registered in the
IANA "JSON Web Signature and Encryption Algorithms" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. Example: RS256.
kid (str): The "kid" (key ID) parameter is used to match a specific key. This
is used, for instance, to choose among a set of keys within a JWK Set
during key rollover. The structure of the "kid" value is
unspecified. When "kid" values are used within a JWK Set, different
keys within the JWK Set SHOULD use distinct "kid" values. (One
example in which different keys might use the same "kid" value is if
they have different "kty" (key type) values but are considered to be
equivalent alternatives by the application using them.) The "kid"
value is a case-sensitive string. Example: 1603dfe0af8f4596.
kty (str): The "kty" (key type) parameter identifies the cryptographic algorithm
family used with the key, such as "RSA" or "EC". "kty" values should
either be registered in the IANA "JSON Web Key Types" registry
established by [JWA] or be a value that contains a Collision-
Resistant Name. The "kty" value is a case-sensitive string. Example: RSA.
use (str): Use ("public key use") identifies the intended use of
the public key. The "use" parameter is employed to indicate whether
a public key is used for encrypting data or verifying the signature
on data. Values are commonly "sig" (signature) or "enc" (encryption). Example: sig.
crv (Union[Unset, str]): Example: P-256.
d (Union[Unset, str]): Example:
T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-
TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-
xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS
4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-
ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpg
NKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-
MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE.
dp (Union[Unset, str]): Example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ
4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0.
dq (Union[Unset, str]): Example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF
7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk.
e (Union[Unset, str]): Example: AQAB.
k (Union[Unset, str]): Example: GawgguFyGrWKav7AX4VKUg.
n (Union[Unset, str]): Example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-
51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO2
86qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd
0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_Kzd
kWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-
WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-
KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0.
p (Union[Unset, str]): Example: 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-
D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5k
zd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-
rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ.
q (Union[Unset, str]): Example: 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-
ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-
uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-
A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ.
qi (Union[Unset, str]): Example: GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-
Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU.
x (Union[Unset, str]): Example: f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU.
x5c (Union[Unset, List[str]]): The "x5c" (X.509 certificate chain) parameter contains a chain of one
or more PKIX certificates [RFC5280]. The certificate chain is
represented as a JSON array of certificate value strings. Each
string in the array is a base64-encoded (Section 4 of [RFC4648] --
not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.
The PKIX certificate containing the key value MUST be the first
certificate.
y (Union[Unset, str]): Example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0.
"""
alg: str
@ -99,6 +108,7 @@ class JSONWebKey:
y: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
alg = self.alg
kid = self.kid
@ -119,18 +129,19 @@ class JSONWebKey:
if not isinstance(self.x5c, Unset):
x5c = self.x5c
y = self.y
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"alg": alg,
"kid": kid,
"kty": kty,
"use": use,
}
)
field_dict.update({
"alg": alg,
"kid": kid,
"kty": kty,
"use": use,
})
if crv is not UNSET:
field_dict["crv"] = crv
if d is not UNSET:
@ -160,6 +171,8 @@ class JSONWebKey:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -195,6 +208,7 @@ class JSONWebKey:
x5c = cast(List[str], _d.pop("x5c", UNSET))
y = _d.pop("y", UNSET)
json_web_key = cls(

View file

@ -1,32 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.json_web_key import JSONWebKey
from ..types import UNSET, Unset
T = TypeVar("T", bound="JSONWebKeySet")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="JSONWebKeySet")
@attr.s(auto_attribs=True)
class JSONWebKeySet:
"""It is important that this model object is named JSONWebKeySet for
"swagger generate spec" to generate only on definition of a
JSONWebKeySet. Since one with the same name is previously defined as
client.Client.JSONWebKeys and this one is last, this one will be
effectively written in the swagger spec.
"swagger generate spec" to generate only on definition of a
JSONWebKeySet. Since one with the same name is previously defined as
client.Client.JSONWebKeys and this one is last, this one will be
effectively written in the swagger spec.
Attributes:
keys (Union[Unset, List[JSONWebKey]]): The value of the "keys" parameter is an array of JWK values. By
default, the order of the JWK values within the array does not imply
an order of preference among them, although applications of JWK Sets
can choose to assign a meaning to the order for their purposes, if
desired.
Attributes:
keys (Union[Unset, List['JSONWebKey']]): The value of the "keys" parameter is an array of JWK values. By
default, the order of the JWK values within the array does not imply
an order of preference among them, although applications of JWK Sets
can choose to assign a meaning to the order for their purposes, if
desired.
"""
keys: Union[Unset, List[JSONWebKey]] = UNSET
keys: Union[Unset, List['JSONWebKey']] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
keys: Union[Unset, List[Dict[str, Any]]] = UNSET
if not isinstance(self.keys, Unset):
@ -36,24 +47,34 @@ class JSONWebKeySet:
keys.append(keys_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if keys is not UNSET:
field_dict["keys"] = keys
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
keys = []
_keys = _d.pop("keys", UNSET)
for keys_item_data in _keys or []:
for keys_item_data in (_keys or []):
keys_item = JSONWebKey.from_dict(keys_item_data)
keys.append(keys_item)
json_web_key_set = cls(
keys=keys,
)

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="JsonWebKeySetGeneratorRequest")
from ..types import UNSET, Unset
T = TypeVar("T", bound="JsonWebKeySetGeneratorRequest")
@attr.s(auto_attribs=True)
class JsonWebKeySetGeneratorRequest:
"""
@ -22,6 +30,7 @@ class JsonWebKeySetGeneratorRequest:
use: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
alg = self.alg
kid = self.kid
@ -29,16 +38,16 @@ class JsonWebKeySetGeneratorRequest:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"alg": alg,
"kid": kid,
"use": use,
}
)
field_dict.update({
"alg": alg,
"kid": kid,
"use": use,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,14 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.o_auth_2_client import OAuth2Client
from ..models.open_id_connect_context import OpenIDConnectContext
from ..types import UNSET, Unset
T = TypeVar("T", bound="LoginRequest")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="LoginRequest")
@attr.s(auto_attribs=True)
class LoginRequest:
"""
@ -42,16 +51,17 @@ class LoginRequest:
"""
challenge: str
client: OAuth2Client
client: 'OAuth2Client'
request_url: str
requested_access_token_audience: List[str]
requested_scope: List[str]
skip: bool
subject: str
oidc_context: Union[Unset, OpenIDConnectContext] = UNSET
oidc_context: Union[Unset, 'OpenIDConnectContext'] = UNSET
session_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
challenge = self.challenge
client = self.client.to_dict()
@ -59,8 +69,14 @@ class LoginRequest:
request_url = self.request_url
requested_access_token_audience = self.requested_access_token_audience
requested_scope = self.requested_scope
skip = self.skip
subject = self.subject
oidc_context: Union[Unset, Dict[str, Any]] = UNSET
@ -71,17 +87,15 @@ class LoginRequest:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"challenge": challenge,
"client": client,
"request_url": request_url,
"requested_access_token_audience": requested_access_token_audience,
"requested_scope": requested_scope,
"skip": skip,
"subject": subject,
}
)
field_dict.update({
"challenge": challenge,
"client": client,
"request_url": request_url,
"requested_access_token_audience": requested_access_token_audience,
"requested_scope": requested_scope,
"skip": skip,
"subject": subject,
})
if oidc_context is not UNSET:
field_dict["oidc_context"] = oidc_context
if session_id is not UNSET:
@ -89,6 +103,8 @@ class LoginRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -96,23 +112,31 @@ class LoginRequest:
client = OAuth2Client.from_dict(_d.pop("client"))
request_url = _d.pop("request_url")
requested_access_token_audience = cast(List[str], _d.pop("requested_access_token_audience"))
requested_scope = cast(List[str], _d.pop("requested_scope"))
skip = _d.pop("skip")
subject = _d.pop("subject")
_oidc_context = _d.pop("oidc_context", UNSET)
oidc_context: Union[Unset, OpenIDConnectContext]
if isinstance(_oidc_context, Unset):
if isinstance(_oidc_context, Unset):
oidc_context = UNSET
else:
oidc_context = OpenIDConnectContext.from_dict(_oidc_context)
session_id = _d.pop("session_id", UNSET)
login_request = cls(

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="LogoutRequest")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="LogoutRequest")
@attr.s(auto_attribs=True)
class LogoutRequest:
"""
@ -24,6 +32,7 @@ class LogoutRequest:
subject: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
request_url = self.request_url
rp_initiated = self.rp_initiated
@ -32,7 +41,8 @@ class LogoutRequest:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if request_url is not UNSET:
field_dict["request_url"] = request_url
if rp_initiated is not UNSET:
@ -44,6 +54,8 @@ class LogoutRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,16 +1,25 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from dateutil.parser import isoparse
from ..models.jose_json_web_key_set import JoseJSONWebKeySet
from ..models.json_raw_message import JSONRawMessage
from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2Client")
from dateutil.parser import isoparse
from typing import Dict
from typing import Union
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="OAuth2Client")
@attr.s(auto_attribs=True)
class OAuth2Client:
"""
@ -117,10 +126,10 @@ class OAuth2Client:
frontchannel_logout_session_required: Union[Unset, bool] = UNSET
frontchannel_logout_uri: Union[Unset, str] = UNSET
grant_types: Union[Unset, List[str]] = UNSET
jwks: Union[Unset, JoseJSONWebKeySet] = UNSET
jwks: Union[Unset, 'JoseJSONWebKeySet'] = UNSET
jwks_uri: Union[Unset, str] = UNSET
logo_uri: Union[Unset, str] = UNSET
metadata: Union[Unset, JSONRawMessage] = UNSET
metadata: Union[Unset, 'JSONRawMessage'] = UNSET
owner: Union[Unset, str] = UNSET
policy_uri: Union[Unset, str] = UNSET
post_logout_redirect_uris: Union[Unset, List[str]] = UNSET
@ -138,15 +147,22 @@ class OAuth2Client:
userinfo_signed_response_alg: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
allowed_cors_origins: Union[Unset, List[str]] = UNSET
if not isinstance(self.allowed_cors_origins, Unset):
allowed_cors_origins = self.allowed_cors_origins
audience: Union[Unset, List[str]] = UNSET
if not isinstance(self.audience, Unset):
audience = self.audience
backchannel_logout_session_required = self.backchannel_logout_session_required
backchannel_logout_uri = self.backchannel_logout_uri
client_id = self.client_id
@ -158,6 +174,9 @@ class OAuth2Client:
if not isinstance(self.contacts, Unset):
contacts = self.contacts
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
@ -168,6 +187,9 @@ class OAuth2Client:
if not isinstance(self.grant_types, Unset):
grant_types = self.grant_types
jwks: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.jwks, Unset):
jwks = self.jwks.to_dict()
@ -184,19 +206,31 @@ class OAuth2Client:
if not isinstance(self.post_logout_redirect_uris, Unset):
post_logout_redirect_uris = self.post_logout_redirect_uris
redirect_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.redirect_uris, Unset):
redirect_uris = self.redirect_uris
request_object_signing_alg = self.request_object_signing_alg
request_uris: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_uris, Unset):
request_uris = self.request_uris
response_types: Union[Unset, List[str]] = UNSET
if not isinstance(self.response_types, Unset):
response_types = self.response_types
scope = self.scope
sector_identifier_uri = self.sector_identifier_uri
subject_type = self.subject_type
@ -211,7 +245,8 @@ class OAuth2Client:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if allowed_cors_origins is not UNSET:
field_dict["allowed_cors_origins"] = allowed_cors_origins
if audience is not UNSET:
@ -281,13 +316,17 @@ class OAuth2Client:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
allowed_cors_origins = cast(List[str], _d.pop("allowed_cors_origins", UNSET))
audience = cast(List[str], _d.pop("audience", UNSET))
backchannel_logout_session_required = _d.pop("backchannel_logout_session_required", UNSET)
backchannel_logout_uri = _d.pop("backchannel_logout_uri", UNSET)
@ -304,51 +343,66 @@ class OAuth2Client:
contacts = cast(List[str], _d.pop("contacts", UNSET))
_created_at = _d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
if isinstance(_created_at, Unset):
if isinstance(_created_at, Unset):
created_at = UNSET
else:
created_at = isoparse(_created_at)
frontchannel_logout_session_required = _d.pop("frontchannel_logout_session_required", UNSET)
frontchannel_logout_uri = _d.pop("frontchannel_logout_uri", UNSET)
grant_types = cast(List[str], _d.pop("grant_types", UNSET))
_jwks = _d.pop("jwks", UNSET)
jwks: Union[Unset, JoseJSONWebKeySet]
if isinstance(_jwks, Unset):
if isinstance(_jwks, Unset):
jwks = UNSET
else:
jwks = JoseJSONWebKeySet.from_dict(_jwks)
jwks_uri = _d.pop("jwks_uri", UNSET)
logo_uri = _d.pop("logo_uri", UNSET)
_metadata = _d.pop("metadata", UNSET)
metadata: Union[Unset, JSONRawMessage]
if isinstance(_metadata, Unset):
if isinstance(_metadata, Unset):
metadata = UNSET
else:
metadata = JSONRawMessage.from_dict(_metadata)
owner = _d.pop("owner", UNSET)
policy_uri = _d.pop("policy_uri", UNSET)
post_logout_redirect_uris = cast(List[str], _d.pop("post_logout_redirect_uris", UNSET))
redirect_uris = cast(List[str], _d.pop("redirect_uris", UNSET))
request_object_signing_alg = _d.pop("request_object_signing_alg", UNSET)
request_uris = cast(List[str], _d.pop("request_uris", UNSET))
response_types = cast(List[str], _d.pop("response_types", UNSET))
scope = _d.pop("scope", UNSET)
sector_identifier_uri = _d.pop("sector_identifier_uri", UNSET)
@ -363,11 +417,14 @@ class OAuth2Client:
_updated_at = _d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]
if isinstance(_updated_at, Unset):
if isinstance(_updated_at, Unset):
updated_at = UNSET
else:
updated_at = isoparse(_updated_at)
userinfo_signed_response_alg = _d.pop("userinfo_signed_response_alg", UNSET)
o_auth_2_client = cls(

View file

@ -1,13 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.o_auth_2_token_introspection_ext import OAuth2TokenIntrospectionExt
from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2TokenIntrospection")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="OAuth2TokenIntrospection")
@attr.s(auto_attribs=True)
class OAuth2TokenIntrospection:
"""https://tools.ietf.org/html/rfc7662
@ -54,7 +64,7 @@ class OAuth2TokenIntrospection:
aud: Union[Unset, List[str]] = UNSET
client_id: Union[Unset, str] = UNSET
exp: Union[Unset, int] = UNSET
ext: Union[Unset, OAuth2TokenIntrospectionExt] = UNSET
ext: Union[Unset, 'OAuth2TokenIntrospectionExt'] = UNSET
iat: Union[Unset, int] = UNSET
iss: Union[Unset, str] = UNSET
nbf: Union[Unset, int] = UNSET
@ -66,12 +76,16 @@ class OAuth2TokenIntrospection:
username: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
active = self.active
aud: Union[Unset, List[str]] = UNSET
if not isinstance(self.aud, Unset):
aud = self.aud
client_id = self.client_id
exp = self.exp
ext: Union[Unset, Dict[str, Any]] = UNSET
@ -90,11 +104,9 @@ class OAuth2TokenIntrospection:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"active": active,
}
)
field_dict.update({
"active": active,
})
if aud is not UNSET:
field_dict["aud"] = aud
if client_id is not UNSET:
@ -124,6 +136,8 @@ class OAuth2TokenIntrospection:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -131,17 +145,21 @@ class OAuth2TokenIntrospection:
aud = cast(List[str], _d.pop("aud", UNSET))
client_id = _d.pop("client_id", UNSET)
exp = _d.pop("exp", UNSET)
_ext = _d.pop("ext", UNSET)
ext: Union[Unset, OAuth2TokenIntrospectionExt]
if isinstance(_ext, Unset):
if isinstance(_ext, Unset):
ext = UNSET
else:
ext = OAuth2TokenIntrospectionExt.from_dict(_ext)
iat = _d.pop("iat", UNSET)
iss = _d.pop("iss", UNSET)

View file

@ -1,28 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="OAuth2TokenIntrospectionExt")
from ..types import UNSET, Unset
T = TypeVar("T", bound="OAuth2TokenIntrospectionExt")
@attr.s(auto_attribs=True)
class OAuth2TokenIntrospectionExt:
"""Extra is arbitrary data set by the session."""
"""Extra is arbitrary data set by the session.
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
o_auth_2_token_introspection_ext = cls()
o_auth_2_token_introspection_ext = cls(
)
o_auth_2_token_introspection_ext.additional_properties = _d
return o_auth_2_token_introspection_ext

View file

@ -0,0 +1,100 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Oauth2TokenData")
@attr.s(auto_attribs=True)
class Oauth2TokenData:
"""
Attributes:
grant_type (str):
code (Union[Unset, str]):
refresh_token (Union[Unset, str]):
redirect_uri (Union[Unset, str]):
client_id (Union[Unset, str]):
"""
grant_type: str
code: Union[Unset, str] = UNSET
refresh_token: Union[Unset, str] = UNSET
redirect_uri: Union[Unset, str] = UNSET
client_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
grant_type = self.grant_type
code = self.code
refresh_token = self.refresh_token
redirect_uri = self.redirect_uri
client_id = self.client_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"grant_type": grant_type,
})
if code is not UNSET:
field_dict["code"] = code
if refresh_token is not UNSET:
field_dict["refresh_token"] = refresh_token
if redirect_uri is not UNSET:
field_dict["redirect_uri"] = redirect_uri
if client_id is not UNSET:
field_dict["client_id"] = client_id
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
grant_type = _d.pop("grant_type")
code = _d.pop("code", UNSET)
refresh_token = _d.pop("refresh_token", UNSET)
redirect_uri = _d.pop("redirect_uri", UNSET)
client_id = _d.pop("client_id", UNSET)
oauth_2_token_data = cls(
grant_type=grant_type,
code=code,
refresh_token=refresh_token,
redirect_uri=redirect_uri,
client_id=client_id,
)
oauth_2_token_data.additional_properties = _d
return oauth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="Oauth2TokenResponse")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Oauth2TokenResponse")
@attr.s(auto_attribs=True)
class Oauth2TokenResponse:
"""The Access Token Response
@ -28,6 +36,7 @@ class Oauth2TokenResponse:
token_type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
access_token = self.access_token
expires_in = self.expires_in
@ -38,7 +47,8 @@ class Oauth2TokenResponse:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if access_token is not UNSET:
field_dict["access_token"] = access_token
if expires_in is not UNSET:
@ -54,6 +64,8 @@ class Oauth2TokenResponse:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,13 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.open_id_connect_context_id_token_hint_claims import OpenIDConnectContextIdTokenHintClaims
from ..types import UNSET, Unset
T = TypeVar("T", bound="OpenIDConnectContext")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="OpenIDConnectContext")
@attr.s(auto_attribs=True)
class OpenIDConnectContext:
"""
@ -58,16 +68,20 @@ class OpenIDConnectContext:
acr_values: Union[Unset, List[str]] = UNSET
display: Union[Unset, str] = UNSET
id_token_hint_claims: Union[Unset, OpenIDConnectContextIdTokenHintClaims] = UNSET
id_token_hint_claims: Union[Unset, 'OpenIDConnectContextIdTokenHintClaims'] = UNSET
login_hint: Union[Unset, str] = UNSET
ui_locales: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
acr_values: Union[Unset, List[str]] = UNSET
if not isinstance(self.acr_values, Unset):
acr_values = self.acr_values
display = self.display
id_token_hint_claims: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.id_token_hint_claims, Unset):
@ -78,9 +92,14 @@ class OpenIDConnectContext:
if not isinstance(self.ui_locales, Unset):
ui_locales = self.ui_locales
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if acr_values is not UNSET:
field_dict["acr_values"] = acr_values
if display is not UNSET:
@ -94,24 +113,31 @@ class OpenIDConnectContext:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
acr_values = cast(List[str], _d.pop("acr_values", UNSET))
display = _d.pop("display", UNSET)
_id_token_hint_claims = _d.pop("id_token_hint_claims", UNSET)
id_token_hint_claims: Union[Unset, OpenIDConnectContextIdTokenHintClaims]
if isinstance(_id_token_hint_claims, Unset):
if isinstance(_id_token_hint_claims, Unset):
id_token_hint_claims = UNSET
else:
id_token_hint_claims = OpenIDConnectContextIdTokenHintClaims.from_dict(_id_token_hint_claims)
login_hint = _d.pop("login_hint", UNSET)
ui_locales = cast(List[str], _d.pop("ui_locales", UNSET))
open_id_connect_context = cls(
acr_values=acr_values,
display=display,

View file

@ -1,32 +1,45 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="OpenIDConnectContextIdTokenHintClaims")
from ..types import UNSET, Unset
T = TypeVar("T", bound="OpenIDConnectContextIdTokenHintClaims")
@attr.s(auto_attribs=True)
class OpenIDConnectContextIdTokenHintClaims:
"""IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a
hint about the
End-User's current or past authenticated session with the Client.
hint about the
End-User's current or past authenticated session with the Client.
"""
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
def to_dict(self) -> Dict[str, Any]:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
open_id_connect_context_id_token_hint_claims = cls()
open_id_connect_context_id_token_hint_claims = cls(
)
open_id_connect_context_id_token_hint_claims.additional_properties = _d
return open_id_connect_context_id_token_hint_claims

View file

@ -1,20 +1,23 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.plugin_config_args import PluginConfigArgs
from ..models.plugin_config_interface import PluginConfigInterface
from ..models.plugin_config_linux import PluginConfigLinux
from ..models.plugin_config_network import PluginConfigNetwork
from ..models.plugin_config_rootfs import PluginConfigRootfs
from ..models.plugin_config_user import PluginConfigUser
from ..models.plugin_env import PluginEnv
from ..models.plugin_mount import PluginMount
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfig")
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginConfig")
@attr.s(auto_attribs=True)
class PluginConfig:
"""
@ -23,11 +26,11 @@ class PluginConfig:
description (str): description
documentation (str): documentation
entrypoint (List[str]): entrypoint
env (List[PluginEnv]): env
env (List['PluginEnv']): env
interface (PluginConfigInterface): PluginConfigInterface The interface between Docker and the plugin
ipc_host (bool): ipc host
linux (PluginConfigLinux): PluginConfigLinux plugin config linux
mounts (List[PluginMount]): mounts
mounts (List['PluginMount']): mounts
network (PluginConfigNetwork): PluginConfigNetwork plugin config network
pid_host (bool): pid host
propagated_mount (str): propagated mount
@ -37,24 +40,25 @@ class PluginConfig:
rootfs (Union[Unset, PluginConfigRootfs]): PluginConfigRootfs plugin config rootfs
"""
args: PluginConfigArgs
args: 'PluginConfigArgs'
description: str
documentation: str
entrypoint: List[str]
env: List[PluginEnv]
interface: PluginConfigInterface
env: List['PluginEnv']
interface: 'PluginConfigInterface'
ipc_host: bool
linux: PluginConfigLinux
mounts: List[PluginMount]
network: PluginConfigNetwork
linux: 'PluginConfigLinux'
mounts: List['PluginMount']
network: 'PluginConfigNetwork'
pid_host: bool
propagated_mount: str
work_dir: str
docker_version: Union[Unset, str] = UNSET
user: Union[Unset, PluginConfigUser] = UNSET
rootfs: Union[Unset, PluginConfigRootfs] = UNSET
user: Union[Unset, 'PluginConfigUser'] = UNSET
rootfs: Union[Unset, 'PluginConfigRootfs'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
args = self.args.to_dict()
@ -62,12 +66,18 @@ class PluginConfig:
documentation = self.documentation
entrypoint = self.entrypoint
env = []
for env_item_data in self.env:
env_item = env_item_data.to_dict()
env.append(env_item)
interface = self.interface.to_dict()
ipc_host = self.ipc_host
@ -79,6 +89,9 @@ class PluginConfig:
mounts.append(mounts_item)
network = self.network.to_dict()
pid_host = self.pid_host
@ -93,25 +106,24 @@ class PluginConfig:
if not isinstance(self.rootfs, Unset):
rootfs = self.rootfs.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Args": args,
"Description": description,
"Documentation": documentation,
"Entrypoint": entrypoint,
"Env": env,
"Interface": interface,
"IpcHost": ipc_host,
"Linux": linux,
"Mounts": mounts,
"Network": network,
"PidHost": pid_host,
"PropagatedMount": propagated_mount,
"WorkDir": work_dir,
}
)
field_dict.update({
"Args": args,
"Description": description,
"Documentation": documentation,
"Entrypoint": entrypoint,
"Env": env,
"Interface": interface,
"IpcHost": ipc_host,
"Linux": linux,
"Mounts": mounts,
"Network": network,
"PidHost": pid_host,
"PropagatedMount": propagated_mount,
"WorkDir": work_dir,
})
if docker_version is not UNSET:
field_dict["DockerVersion"] = docker_version
if user is not UNSET:
@ -121,39 +133,60 @@ class PluginConfig:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
args = PluginConfigArgs.from_dict(_d.pop("Args"))
description = _d.pop("Description")
documentation = _d.pop("Documentation")
entrypoint = cast(List[str], _d.pop("Entrypoint"))
env = []
_env = _d.pop("Env")
for env_item_data in _env:
for env_item_data in (_env):
env_item = PluginEnv.from_dict(env_item_data)
env.append(env_item)
interface = PluginConfigInterface.from_dict(_d.pop("Interface"))
ipc_host = _d.pop("IpcHost")
linux = PluginConfigLinux.from_dict(_d.pop("Linux"))
mounts = []
_mounts = _d.pop("Mounts")
for mounts_item_data in _mounts:
for mounts_item_data in (_mounts):
mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item)
network = PluginConfigNetwork.from_dict(_d.pop("Network"))
pid_host = _d.pop("PidHost")
propagated_mount = _d.pop("PropagatedMount")
@ -164,18 +197,24 @@ class PluginConfig:
_user = _d.pop("User", UNSET)
user: Union[Unset, PluginConfigUser]
if isinstance(_user, Unset):
if isinstance(_user, Unset):
user = UNSET
else:
user = PluginConfigUser.from_dict(_user)
_rootfs = _d.pop("rootfs", UNSET)
rootfs: Union[Unset, PluginConfigRootfs]
if isinstance(_rootfs, Unset):
if isinstance(_rootfs, Unset):
rootfs = UNSET
else:
rootfs = PluginConfigRootfs.from_dict(_rootfs)
plugin_config = cls(
args=args,
description=description,

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginConfigArgs")
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginConfigArgs")
@attr.s(auto_attribs=True)
class PluginConfigArgs:
@ -22,26 +31,34 @@ class PluginConfigArgs:
value: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
settable = self.settable
value = self.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
}
)
field_dict.update({
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -51,8 +68,10 @@ class PluginConfigArgs:
settable = cast(List[str], _d.pop("Settable"))
value = cast(List[str], _d.pop("Value"))
plugin_config_args = cls(
description=description,
name=name,

View file

@ -1,25 +1,35 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.plugin_interface_type import PluginInterfaceType
from ..types import UNSET, Unset
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginConfigInterface")
@attr.s(auto_attribs=True)
class PluginConfigInterface:
"""PluginConfigInterface The interface between Docker and the plugin
Attributes:
socket (str): socket
types (List[PluginInterfaceType]): types
types (List['PluginInterfaceType']): types
"""
socket: str
types: List[PluginInterfaceType]
types: List['PluginInterfaceType']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
socket = self.socket
types = []
@ -28,17 +38,21 @@ class PluginConfigInterface:
types.append(types_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Socket": socket,
"Types": types,
}
)
field_dict.update({
"Socket": socket,
"Types": types,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -46,11 +60,14 @@ class PluginConfigInterface:
types = []
_types = _d.pop("Types")
for types_item_data in _types:
for types_item_data in (_types):
types_item = PluginInterfaceType.from_dict(types_item_data)
types.append(types_item)
plugin_config_interface = cls(
socket=socket,
types=types,

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.plugin_device import PluginDevice
from ..types import UNSET, Unset
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginConfigLinux")
@attr.s(auto_attribs=True)
class PluginConfigLinux:
"""PluginConfigLinux plugin config linux
@ -14,36 +23,44 @@ class PluginConfigLinux:
Attributes:
allow_all_devices (bool): allow all devices
capabilities (List[str]): capabilities
devices (List[PluginDevice]): devices
devices (List['PluginDevice']): devices
"""
allow_all_devices: bool
capabilities: List[str]
devices: List[PluginDevice]
devices: List['PluginDevice']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
allow_all_devices = self.allow_all_devices
capabilities = self.capabilities
devices = []
for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict()
devices.append(devices_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"AllowAllDevices": allow_all_devices,
"Capabilities": capabilities,
"Devices": devices,
}
)
field_dict.update({
"AllowAllDevices": allow_all_devices,
"Capabilities": capabilities,
"Devices": devices,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -51,13 +68,17 @@ class PluginConfigLinux:
capabilities = cast(List[str], _d.pop("Capabilities"))
devices = []
_devices = _d.pop("Devices")
for devices_item_data in _devices:
for devices_item_data in (_devices):
devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item)
plugin_config_linux = cls(
allow_all_devices=allow_all_devices,
capabilities=capabilities,

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginConfigNetwork")
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigNetwork")
@attr.s(auto_attribs=True)
class PluginConfigNetwork:
"""PluginConfigNetwork plugin config network
@ -16,19 +24,20 @@ class PluginConfigNetwork:
type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Type": type,
}
)
field_dict.update({
"Type": type,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,12 +1,21 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigRootfs")
from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="PluginConfigRootfs")
@attr.s(auto_attribs=True)
class PluginConfigRootfs:
"""PluginConfigRootfs plugin config rootfs
@ -20,16 +29,21 @@ class PluginConfigRootfs:
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
diff_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.diff_ids, Unset):
diff_ids = self.diff_ids
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if diff_ids is not UNSET:
field_dict["diff_ids"] = diff_ids
if type is not UNSET:
@ -37,11 +51,14 @@ class PluginConfigRootfs:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
diff_ids = cast(List[str], _d.pop("diff_ids", UNSET))
type = _d.pop("type", UNSET)
plugin_config_rootfs = cls(

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginConfigUser")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="PluginConfigUser")
@attr.s(auto_attribs=True)
class PluginConfigUser:
"""PluginConfigUser plugin config user
@ -20,13 +28,15 @@ class PluginConfigUser:
uid: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
gid = self.gid
uid = self.uid
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if gid is not UNSET:
field_dict["GID"] = gid
if uid is not UNSET:
@ -34,6 +44,8 @@ class PluginConfigUser:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginDevice")
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginDevice")
@attr.s(auto_attribs=True)
class PluginDevice:
@ -22,25 +31,30 @@ class PluginDevice:
settable: List[str]
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
path = self.path
settable = self.settable
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Path": path,
"Settable": settable,
}
)
field_dict.update({
"Description": description,
"Name": name,
"Path": path,
"Settable": settable,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -52,6 +66,7 @@ class PluginDevice:
settable = cast(List[str], _d.pop("Settable"))
plugin_device = cls(
description=description,
name=name,

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginEnv")
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginEnv")
@attr.s(auto_attribs=True)
class PluginEnv:
@ -22,26 +31,30 @@ class PluginEnv:
value: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
name = self.name
settable = self.settable
value = self.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
}
)
field_dict.update({
"Description": description,
"Name": name,
"Settable": settable,
"Value": value,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -51,6 +64,7 @@ class PluginEnv:
settable = cast(List[str], _d.pop("Settable"))
value = _d.pop("Value")
plugin_env = cls(

View file

@ -1,10 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginInterfaceType")
from ..types import UNSET, Unset
T = TypeVar("T", bound="PluginInterfaceType")
@attr.s(auto_attribs=True)
class PluginInterfaceType:
"""PluginInterfaceType plugin interface type
@ -20,6 +28,7 @@ class PluginInterfaceType:
version: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
capability = self.capability
prefix = self.prefix
@ -27,16 +36,16 @@ class PluginInterfaceType:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Capability": capability,
"Prefix": prefix,
"Version": version,
}
)
field_dict.update({
"Capability": capability,
"Prefix": prefix,
"Version": version,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,9 +1,18 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="PluginMount")
from ..types import UNSET, Unset
from typing import cast, List
T = TypeVar("T", bound="PluginMount")
@attr.s(auto_attribs=True)
class PluginMount:
@ -28,33 +37,40 @@ class PluginMount:
type: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
description = self.description
destination = self.destination
name = self.name
options = self.options
settable = self.settable
source = self.source
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Description": description,
"Destination": destination,
"Name": name,
"Options": options,
"Settable": settable,
"Source": source,
"Type": type,
}
)
field_dict.update({
"Description": description,
"Destination": destination,
"Name": name,
"Options": options,
"Settable": settable,
"Source": source,
"Type": type,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -66,8 +82,10 @@ class PluginMount:
options = cast(List[str], _d.pop("Options"))
settable = cast(List[str], _d.pop("Settable"))
source = _d.pop("Source")
type = _d.pop("Type")

View file

@ -1,80 +1,110 @@
from typing import Any, Dict, List, Type, TypeVar, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..models.plugin_device import PluginDevice
from ..models.plugin_mount import PluginMount
from ..types import UNSET, Unset
from typing import cast
from typing import cast, List
from typing import Dict
T = TypeVar("T", bound="PluginSettings")
@attr.s(auto_attribs=True)
class PluginSettings:
"""
Attributes:
args (List[str]): args
devices (List[PluginDevice]): devices
devices (List['PluginDevice']): devices
env (List[str]): env
mounts (List[PluginMount]): mounts
mounts (List['PluginMount']): mounts
"""
args: List[str]
devices: List[PluginDevice]
devices: List['PluginDevice']
env: List[str]
mounts: List[PluginMount]
mounts: List['PluginMount']
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
args = self.args
devices = []
for devices_item_data in self.devices:
devices_item = devices_item_data.to_dict()
devices.append(devices_item)
env = self.env
mounts = []
for mounts_item_data in self.mounts:
mounts_item = mounts_item_data.to_dict()
mounts.append(mounts_item)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"Args": args,
"Devices": devices,
"Env": env,
"Mounts": mounts,
}
)
field_dict.update({
"Args": args,
"Devices": devices,
"Env": env,
"Mounts": mounts,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
args = cast(List[str], _d.pop("Args"))
devices = []
_devices = _d.pop("Devices")
for devices_item_data in _devices:
for devices_item_data in (_devices):
devices_item = PluginDevice.from_dict(devices_item_data)
devices.append(devices_item)
env = cast(List[str], _d.pop("Env"))
mounts = []
_mounts = _d.pop("Mounts")
for mounts_item_data in _mounts:
for mounts_item_data in (_mounts):
mounts_item = PluginMount.from_dict(mounts_item_data)
mounts.append(mounts_item)
plugin_settings = cls(
args=args,
devices=devices,

View file

@ -1,44 +1,54 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from dateutil.parser import isoparse
from ..models.consent_request import ConsentRequest
from ..models.consent_request_session import ConsentRequestSession
from ..types import UNSET, Unset
T = TypeVar("T", bound="PreviousConsentSession")
from dateutil.parser import isoparse
from typing import Union
from typing import Dict
from typing import cast
from ..types import UNSET, Unset
from typing import cast, List
import datetime
T = TypeVar("T", bound="PreviousConsentSession")
@attr.s(auto_attribs=True)
class PreviousConsentSession:
"""The response used to return used consent requests
same as HandledLoginRequest, just with consent_request exposed as json
same as HandledLoginRequest, just with consent_request exposed as json
Attributes:
consent_request (Union[Unset, ConsentRequest]):
grant_access_token_audience (Union[Unset, List[str]]):
grant_scope (Union[Unset, List[str]]):
handled_at (Union[Unset, datetime.datetime]):
remember (Union[Unset, bool]): Remember, if set to true, tells ORY Hydra to remember this consent authorization
and reuse it if the same
client asks the same user for the same, or a subset of, scope.
remember_for (Union[Unset, int]): RememberFor sets how long the consent authorization should be remembered for
in seconds. If set to `0`, the
authorization will be remembered indefinitely.
session (Union[Unset, ConsentRequestSession]):
Attributes:
consent_request (Union[Unset, ConsentRequest]):
grant_access_token_audience (Union[Unset, List[str]]):
grant_scope (Union[Unset, List[str]]):
handled_at (Union[Unset, datetime.datetime]):
remember (Union[Unset, bool]): Remember, if set to true, tells ORY Hydra to remember this consent authorization
and reuse it if the same
client asks the same user for the same, or a subset of, scope.
remember_for (Union[Unset, int]): RememberFor sets how long the consent authorization should be remembered for
in seconds. If set to `0`, the
authorization will be remembered indefinitely.
session (Union[Unset, ConsentRequestSession]):
"""
consent_request: Union[Unset, ConsentRequest] = UNSET
consent_request: Union[Unset, 'ConsentRequest'] = UNSET
grant_access_token_audience: Union[Unset, List[str]] = UNSET
grant_scope: Union[Unset, List[str]] = UNSET
handled_at: Union[Unset, datetime.datetime] = UNSET
remember: Union[Unset, bool] = UNSET
remember_for: Union[Unset, int] = UNSET
session: Union[Unset, ConsentRequestSession] = UNSET
session: Union[Unset, 'ConsentRequestSession'] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
consent_request: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.consent_request, Unset):
@ -48,10 +58,16 @@ class PreviousConsentSession:
if not isinstance(self.grant_access_token_audience, Unset):
grant_access_token_audience = self.grant_access_token_audience
grant_scope: Union[Unset, List[str]] = UNSET
if not isinstance(self.grant_scope, Unset):
grant_scope = self.grant_scope
handled_at: Union[Unset, str] = UNSET
if not isinstance(self.handled_at, Unset):
handled_at = self.handled_at.isoformat()
@ -62,9 +78,11 @@ class PreviousConsentSession:
if not isinstance(self.session, Unset):
session = self.session.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if consent_request is not UNSET:
field_dict["consent_request"] = consent_request
if grant_access_token_audience is not UNSET:
@ -82,38 +100,51 @@ class PreviousConsentSession:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
_consent_request = _d.pop("consent_request", UNSET)
consent_request: Union[Unset, ConsentRequest]
if isinstance(_consent_request, Unset):
if isinstance(_consent_request, Unset):
consent_request = UNSET
else:
consent_request = ConsentRequest.from_dict(_consent_request)
grant_access_token_audience = cast(List[str], _d.pop("grant_access_token_audience", UNSET))
grant_scope = cast(List[str], _d.pop("grant_scope", UNSET))
_handled_at = _d.pop("handled_at", UNSET)
handled_at: Union[Unset, datetime.datetime]
if isinstance(_handled_at, Unset):
if isinstance(_handled_at, Unset):
handled_at = UNSET
else:
handled_at = isoparse(_handled_at)
remember = _d.pop("remember", UNSET)
remember_for = _d.pop("remember_for", UNSET)
_session = _d.pop("session", UNSET)
session: Union[Unset, ConsentRequestSession]
if isinstance(_session, Unset):
if isinstance(_session, Unset):
session = UNSET
else:
session = ConsentRequestSession.from_dict(_session)
previous_consent_session = cls(
consent_request=consent_request,
grant_access_token_audience=grant_access_token_audience,

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="RejectRequest")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="RejectRequest")
@attr.s(auto_attribs=True)
class RejectRequest:
"""
@ -32,6 +40,7 @@ class RejectRequest:
status_code: Union[Unset, int] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
error = self.error
error_debug = self.error_debug
@ -41,7 +50,8 @@ class RejectRequest:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if error is not UNSET:
field_dict["error"] = error
if error_debug is not UNSET:
@ -55,6 +65,8 @@ class RejectRequest:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -0,0 +1,66 @@
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="RevokeOAuth2TokenData")
@attr.s(auto_attribs=True)
class RevokeOAuth2TokenData:
"""
Attributes:
token (str):
"""
token: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
token = self.token
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({
"token": token,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
token = _d.pop("token")
revoke_o_auth_2_token_data = cls(
token=token,
)
revoke_o_auth_2_token_data.additional_properties = _d
return revoke_o_auth_2_token_data
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="UserinfoResponse")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="UserinfoResponse")
@attr.s(auto_attribs=True)
class UserinfoResponse:
"""The userinfo response
@ -91,6 +99,7 @@ class UserinfoResponse:
zoneinfo: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
birthdate = self.birthdate
email = self.email
@ -114,7 +123,8 @@ class UserinfoResponse:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if birthdate is not UNSET:
field_dict["birthdate"] = birthdate
if email is not UNSET:
@ -156,6 +166,8 @@ class UserinfoResponse:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,12 +1,20 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="Version")
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="Version")
@attr.s(auto_attribs=True)
class Version:
"""
@ -17,17 +25,21 @@ class Version:
version: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
version = self.version
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict.update({
})
if version is not UNSET:
field_dict["version"] = version
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,43 +1,52 @@
from typing import Any, Dict, List, Type, TypeVar
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
T = TypeVar("T", bound="VolumeUsageData")
from ..types import UNSET, Unset
T = TypeVar("T", bound="VolumeUsageData")
@attr.s(auto_attribs=True)
class VolumeUsageData:
"""VolumeUsageData Usage details about the volume. This information is used by the
`GET /system/df` endpoint, and omitted in other endpoints.
`GET /system/df` endpoint, and omitted in other endpoints.
Attributes:
ref_count (int): The number of containers referencing this volume. This field
is set to `-1` if the reference-count is not available.
size (int): Amount of disk space used by the volume (in bytes). This information
is only available for volumes created with the `"local"` volume
driver. For volumes created with other volume drivers, this field
is set to `-1` ("not available")
Attributes:
ref_count (int): The number of containers referencing this volume. This field
is set to `-1` if the reference-count is not available.
size (int): Amount of disk space used by the volume (in bytes). This information
is only available for volumes created with the `"local"` volume
driver. For volumes created with other volume drivers, this field
is set to `-1` ("not available")
"""
ref_count: int
size: int
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
ref_count = self.ref_count
size = self.size
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"RefCount": ref_count,
"Size": size,
}
)
field_dict.update({
"RefCount": ref_count,
"Size": size,
})
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()

View file

@ -1,94 +1,103 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO
from typing import List
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="WellKnown")
from typing import cast, List
from ..types import UNSET, Unset
from typing import Union
T = TypeVar("T", bound="WellKnown")
@attr.s(auto_attribs=True)
class WellKnown:
"""It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature
algorithms
among others.
algorithms
among others.
Attributes:
authorization_endpoint (str): URL of the OP's OAuth 2.0 Authorization Endpoint. Example:
https://playground.ory.sh/ory-hydra/public/oauth2/auth.
id_token_signing_alg_values_supported (List[str]): JSON array containing a list of the JWS signing algorithms
(alg values) supported by the OP for the ID Token
to encode the Claims in a JWT.
issuer (str): URL using the https scheme with no query or fragment component that the OP asserts as its
IssuerURL Identifier.
If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned
by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
Example: https://playground.ory.sh/ory-hydra/public/.
jwks_uri (str): URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to
validate
signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs
to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)
parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.
Although some algorithms allow the same key to be used for both signatures and encryption, doing so is
NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of
keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
Example: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json.
response_types_supported (List[str]): JSON array containing a list of the OAuth 2.0 response_type values that
this OP supports. Dynamic OpenID
Providers MUST support the code, id_token, and the token id_token Response Type values.
subject_types_supported (List[str]): JSON array containing a list of the Subject Identifier types that this OP
supports. Valid types include
pairwise and public.
token_endpoint (str): URL of the OP's OAuth 2.0 Token Endpoint Example: https://playground.ory.sh/ory-
hydra/public/oauth2/token.
backchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass a
sid (session ID) Claim in the Logout Token to identify the RP
session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
backchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports back-channel
logout, with true indicating support.
claims_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
claims parameter, with true indicating support.
claims_supported (Union[Unset, List[str]]): JSON array containing a list of the Claim Names of the Claims that
the OpenID Provider MAY be able to supply
values for. Note that for privacy or other reasons, this might not be an exhaustive list.
end_session_endpoint (Union[Unset, str]): URL at the OP to which an RP can perform a redirect to request that
the End-User be logged out at the OP.
frontchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass iss
(issuer) and sid (session ID) query parameters to identify
the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also
included in ID Tokens issued by the OP.
frontchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports HTTP-based
logout, with true indicating support.
grant_types_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 Grant Type values
that this OP supports.
registration_endpoint (Union[Unset, str]): URL of the OP's Dynamic Client Registration Endpoint. Example:
https://playground.ory.sh/ory-hydra/admin/client.
request_object_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS
signing algorithms (alg values) supported by the OP for Request Objects,
which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when
the Request Object is passed by value (using the request parameter) and when it is passed by reference
(using the request_uri parameter).
request_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
request parameter, with true indicating support.
request_uri_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of
the request_uri parameter, with true indicating support.
require_request_uri_registration (Union[Unset, bool]): Boolean value specifying whether the OP requires any
request_uri values used to be pre-registered
using the request_uris registration parameter.
response_modes_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 response_mode
values that this OP supports.
revocation_endpoint (Union[Unset, str]): URL of the authorization server's OAuth 2.0 revocation endpoint.
scopes_supported (Union[Unset, List[str]]): SON array containing a list of the OAuth 2.0 [RFC6749] scope values
that this server supports. The server MUST
support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this
parameter is used
token_endpoint_auth_methods_supported (Union[Unset, List[str]]): JSON array containing a list of Client
Authentication methods supported by this Token Endpoint. The options are
client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of
OpenID Connect Core 1.0
userinfo_endpoint (Union[Unset, str]): URL of the OP's UserInfo Endpoint.
userinfo_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS [JWS]
signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
Attributes:
authorization_endpoint (str): URL of the OP's OAuth 2.0 Authorization Endpoint. Example:
https://playground.ory.sh/ory-hydra/public/oauth2/auth.
id_token_signing_alg_values_supported (List[str]): JSON array containing a list of the JWS signing algorithms
(alg values) supported by the OP for the ID Token
to encode the Claims in a JWT.
issuer (str): URL using the https scheme with no query or fragment component that the OP asserts as its
IssuerURL Identifier.
If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned
by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
Example: https://playground.ory.sh/ory-hydra/public/.
jwks_uri (str): URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to
validate
signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs
to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)
parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.
Although some algorithms allow the same key to be used for both signatures and encryption, doing so is
NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of
keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
Example: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json.
response_types_supported (List[str]): JSON array containing a list of the OAuth 2.0 response_type values that
this OP supports. Dynamic OpenID
Providers MUST support the code, id_token, and the token id_token Response Type values.
subject_types_supported (List[str]): JSON array containing a list of the Subject Identifier types that this OP
supports. Valid types include
pairwise and public.
token_endpoint (str): URL of the OP's OAuth 2.0 Token Endpoint Example: https://playground.ory.sh/ory-
hydra/public/oauth2/token.
backchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass a
sid (session ID) Claim in the Logout Token to identify the RP
session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
backchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports back-channel
logout, with true indicating support.
claims_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
claims parameter, with true indicating support.
claims_supported (Union[Unset, List[str]]): JSON array containing a list of the Claim Names of the Claims that
the OpenID Provider MAY be able to supply
values for. Note that for privacy or other reasons, this might not be an exhaustive list.
end_session_endpoint (Union[Unset, str]): URL at the OP to which an RP can perform a redirect to request that
the End-User be logged out at the OP.
frontchannel_logout_session_supported (Union[Unset, bool]): Boolean value specifying whether the OP can pass iss
(issuer) and sid (session ID) query parameters to identify
the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also
included in ID Tokens issued by the OP.
frontchannel_logout_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports HTTP-based
logout, with true indicating support.
grant_types_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 Grant Type values
that this OP supports.
registration_endpoint (Union[Unset, str]): URL of the OP's Dynamic Client Registration Endpoint. Example:
https://playground.ory.sh/ory-hydra/admin/client.
request_object_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS
signing algorithms (alg values) supported by the OP for Request Objects,
which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when
the Request Object is passed by value (using the request parameter) and when it is passed by reference
(using the request_uri parameter).
request_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of the
request parameter, with true indicating support.
request_uri_parameter_supported (Union[Unset, bool]): Boolean value specifying whether the OP supports use of
the request_uri parameter, with true indicating support.
require_request_uri_registration (Union[Unset, bool]): Boolean value specifying whether the OP requires any
request_uri values used to be pre-registered
using the request_uris registration parameter.
response_modes_supported (Union[Unset, List[str]]): JSON array containing a list of the OAuth 2.0 response_mode
values that this OP supports.
revocation_endpoint (Union[Unset, str]): URL of the authorization server's OAuth 2.0 revocation endpoint.
scopes_supported (Union[Unset, List[str]]): SON array containing a list of the OAuth 2.0 [RFC6749] scope values
that this server supports. The server MUST
support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this
parameter is used
token_endpoint_auth_methods_supported (Union[Unset, List[str]]): JSON array containing a list of Client
Authentication methods supported by this Token Endpoint. The options are
client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of
OpenID Connect Core 1.0
userinfo_endpoint (Union[Unset, str]): URL of the OP's UserInfo Endpoint.
userinfo_signing_alg_values_supported (Union[Unset, List[str]]): JSON array containing a list of the JWS [JWS]
signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
"""
authorization_endpoint: str
@ -119,16 +128,26 @@ class WellKnown:
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
authorization_endpoint = self.authorization_endpoint
id_token_signing_alg_values_supported = self.id_token_signing_alg_values_supported
issuer = self.issuer
jwks_uri = self.jwks_uri
response_types_supported = self.response_types_supported
subject_types_supported = self.subject_types_supported
token_endpoint = self.token_endpoint
backchannel_logout_session_supported = self.backchannel_logout_session_supported
backchannel_logout_supported = self.backchannel_logout_supported
@ -137,6 +156,9 @@ class WellKnown:
if not isinstance(self.claims_supported, Unset):
claims_supported = self.claims_supported
end_session_endpoint = self.end_session_endpoint
frontchannel_logout_session_supported = self.frontchannel_logout_session_supported
frontchannel_logout_supported = self.frontchannel_logout_supported
@ -144,11 +166,17 @@ class WellKnown:
if not isinstance(self.grant_types_supported, Unset):
grant_types_supported = self.grant_types_supported
registration_endpoint = self.registration_endpoint
request_object_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.request_object_signing_alg_values_supported, Unset):
request_object_signing_alg_values_supported = self.request_object_signing_alg_values_supported
request_parameter_supported = self.request_parameter_supported
request_uri_parameter_supported = self.request_uri_parameter_supported
require_request_uri_registration = self.require_request_uri_registration
@ -156,33 +184,44 @@ class WellKnown:
if not isinstance(self.response_modes_supported, Unset):
response_modes_supported = self.response_modes_supported
revocation_endpoint = self.revocation_endpoint
scopes_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.scopes_supported, Unset):
scopes_supported = self.scopes_supported
token_endpoint_auth_methods_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.token_endpoint_auth_methods_supported, Unset):
token_endpoint_auth_methods_supported = self.token_endpoint_auth_methods_supported
userinfo_endpoint = self.userinfo_endpoint
userinfo_signing_alg_values_supported: Union[Unset, List[str]] = UNSET
if not isinstance(self.userinfo_signing_alg_values_supported, Unset):
userinfo_signing_alg_values_supported = self.userinfo_signing_alg_values_supported
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"authorization_endpoint": authorization_endpoint,
"id_token_signing_alg_values_supported": id_token_signing_alg_values_supported,
"issuer": issuer,
"jwks_uri": jwks_uri,
"response_types_supported": response_types_supported,
"subject_types_supported": subject_types_supported,
"token_endpoint": token_endpoint,
}
)
field_dict.update({
"authorization_endpoint": authorization_endpoint,
"id_token_signing_alg_values_supported": id_token_signing_alg_values_supported,
"issuer": issuer,
"jwks_uri": jwks_uri,
"response_types_supported": response_types_supported,
"subject_types_supported": subject_types_supported,
"token_endpoint": token_endpoint,
})
if backchannel_logout_session_supported is not UNSET:
field_dict["backchannel_logout_session_supported"] = backchannel_logout_session_supported
if backchannel_logout_supported is not UNSET:
@ -224,6 +263,8 @@ class WellKnown:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
_d = src_dict.copy()
@ -231,14 +272,17 @@ class WellKnown:
id_token_signing_alg_values_supported = cast(List[str], _d.pop("id_token_signing_alg_values_supported"))
issuer = _d.pop("issuer")
jwks_uri = _d.pop("jwks_uri")
response_types_supported = cast(List[str], _d.pop("response_types_supported"))
subject_types_supported = cast(List[str], _d.pop("subject_types_supported"))
token_endpoint = _d.pop("token_endpoint")
backchannel_logout_session_supported = _d.pop("backchannel_logout_session_supported", UNSET)
@ -249,6 +293,7 @@ class WellKnown:
claims_supported = cast(List[str], _d.pop("claims_supported", UNSET))
end_session_endpoint = _d.pop("end_session_endpoint", UNSET)
frontchannel_logout_session_supported = _d.pop("frontchannel_logout_session_supported", UNSET)
@ -257,11 +302,11 @@ class WellKnown:
grant_types_supported = cast(List[str], _d.pop("grant_types_supported", UNSET))
registration_endpoint = _d.pop("registration_endpoint", UNSET)
request_object_signing_alg_values_supported = cast(
List[str], _d.pop("request_object_signing_alg_values_supported", UNSET)
)
request_object_signing_alg_values_supported = cast(List[str], _d.pop("request_object_signing_alg_values_supported", UNSET))
request_parameter_supported = _d.pop("request_parameter_supported", UNSET)
@ -271,16 +316,20 @@ class WellKnown:
response_modes_supported = cast(List[str], _d.pop("response_modes_supported", UNSET))
revocation_endpoint = _d.pop("revocation_endpoint", UNSET)
scopes_supported = cast(List[str], _d.pop("scopes_supported", UNSET))
token_endpoint_auth_methods_supported = cast(List[str], _d.pop("token_endpoint_auth_methods_supported", UNSET))
userinfo_endpoint = _d.pop("userinfo_endpoint", UNSET)
userinfo_signing_alg_values_supported = cast(List[str], _d.pop("userinfo_signing_alg_values_supported", UNSET))
well_known = cls(
authorization_endpoint=authorization_endpoint,
id_token_signing_alg_values_supported=id_token_signing_alg_values_supported,

View file

@ -1,5 +1,5 @@
""" Contains some shared types for properties """
from typing import BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar
from typing import Any, BinaryIO, Generic, MutableMapping, Optional, Tuple, TypeVar
import attr
@ -16,14 +16,14 @@ FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]]
@attr.s(auto_attribs=True)
class File:
"""Contains information for file uploads"""
""" Contains information for file uploads """
payload: BinaryIO
file_name: Optional[str] = None
mime_type: Optional[str] = None
def to_tuple(self) -> FileJsonType:
"""Return a tuple representation that httpx will accept for multipart/form-data"""
""" Return a tuple representation that httpx will accept for multipart/form-data """
return self.file_name, self.payload, self.mime_type
@ -32,7 +32,7 @@ T = TypeVar("T")
@attr.s(auto_attribs=True)
class Response(Generic[T]):
"""A response from an endpoint"""
""" A response from an endpoint """
status_code: int
content: bytes

View file

@ -13,4 +13,4 @@ exclude = '''
[tool.isort]
line_length = 120
profile = "black"
profile = "black"

View file

@ -13,6 +13,6 @@ setup(
long_description_content_type="text/markdown",
packages=find_packages(),
python_requires=">=3.7, <4",
install_requires=["httpx >= 0.15.0, < 0.23.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
install_requires=["httpx >= 0.15.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
package_data={"ory_hydra_client": ["py.typed"]},
)