update to new version of openapi-python-client
now: 0.13.0
This commit is contained in:
		
							parent
							
								
									deb73d06e6
								
							
						
					
					
						commit
						4a31250bca
					
				
					 159 changed files with 13668 additions and 11420 deletions
				
			
		| 
						 | 
				
			
			@ -1,298 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 ...models.accept_login_request import AcceptLoginRequest
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptLoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = CompletedRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[CompletedRequest, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptLoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has successfully authenticated and includes
 | 
			
		||||
    additional information such as
 | 
			
		||||
    the subject's ID and if ORY Hydra should remember the subject's subject agent for future
 | 
			
		||||
    authentication attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (AcceptLoginRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptLoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has successfully authenticated and includes
 | 
			
		||||
    additional information such as
 | 
			
		||||
    the subject's ID and if ORY Hydra should remember the subject's subject agent for future
 | 
			
		||||
    authentication attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (AcceptLoginRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has successfully authenticated and includes
 | 
			
		||||
    additional information such as
 | 
			
		||||
    the subject's ID and if ORY Hydra should remember the subject's subject agent for future
 | 
			
		||||
    authentication attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (AcceptLoginRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has successfully authenticated and includes
 | 
			
		||||
    additional information such as
 | 
			
		||||
    the subject's ID and if ORY Hydra should remember the subject's subject agent for future
 | 
			
		||||
    authentication attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (AcceptLoginRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,209 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = CompletedRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[CompletedRequest, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,223 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.CREATED:
 | 
			
		||||
        response_201 = OAuth2Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_201
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.CONFLICT:
 | 
			
		||||
        response_409 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_409
 | 
			
		||||
    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, OAuth2Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Create an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a
 | 
			
		||||
    random secret will be generated. The secret will be returned in the response and you will not be
 | 
			
		||||
    able to retrieve it later on. Write the secret down and keep it somwhere safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Create an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a
 | 
			
		||||
    random secret will be generated. The secret will be returned in the response and you will not be
 | 
			
		||||
    able to retrieve it later on. Write the secret down and keep it somwhere safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Create an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a
 | 
			
		||||
    random secret will be generated. The secret will be returned in the response and you will not be
 | 
			
		||||
    able to retrieve it later on. Write the secret down and keep it somwhere safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a
 | 
			
		||||
    random secret will be generated. The secret will be returned in the response and you will not be
 | 
			
		||||
    able to retrieve it later on. Write the secret down and keep it somwhere safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,225 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,212 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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_)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "delete",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,202 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "delete",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Deletes an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Deletes an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Deletes an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,189 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    client_id: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete OAuth2 Access Tokens from a Client
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued for a client from the database
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
client_id=client_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    client_id: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Delete OAuth2 Access Tokens from a Client
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued for a client from the database
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued for a client from the database
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
client_id=client_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued for a client from the database
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
client_id=client_id,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,202 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    json_json_body = json_body.to_dict()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: FlushInactiveOAuth2TokensRequest,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Flush Expired OAuth2 Access Tokens
 | 
			
		||||
 | 
			
		||||
     This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which
 | 
			
		||||
    no tokens will be
 | 
			
		||||
    not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be
 | 
			
		||||
    flushed as they are deleted
 | 
			
		||||
    automatically when performing the refresh flow.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (FlushInactiveOAuth2TokensRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: FlushInactiveOAuth2TokensRequest,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Flush Expired OAuth2 Access Tokens
 | 
			
		||||
 | 
			
		||||
     This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which
 | 
			
		||||
    no tokens will be
 | 
			
		||||
    not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be
 | 
			
		||||
    flushed as they are deleted
 | 
			
		||||
    automatically when performing the refresh flow.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (FlushInactiveOAuth2TokensRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: FlushInactiveOAuth2TokensRequest,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Flush Expired OAuth2 Access Tokens
 | 
			
		||||
 | 
			
		||||
     This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which
 | 
			
		||||
    no tokens will be
 | 
			
		||||
    not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be
 | 
			
		||||
    flushed as they are deleted
 | 
			
		||||
    automatically when performing the refresh flow.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (FlushInactiveOAuth2TokensRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which
 | 
			
		||||
    no tokens will be
 | 
			
		||||
    not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be
 | 
			
		||||
    flushed as they are deleted
 | 
			
		||||
    automatically when performing the refresh flow.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (FlushInactiveOAuth2TokensRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,263 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[ConsentRequest, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = ConsentRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    if response.status_code == HTTPStatus.CONFLICT:
 | 
			
		||||
        response_409 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_409
 | 
			
		||||
    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[ConsentRequest, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ConsentRequest, GenericError]]:
 | 
			
		||||
    """Get Consent Request Information
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ConsentRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ConsentRequest, GenericError]]:
 | 
			
		||||
    """Get Consent Request Information
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ConsentRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ConsentRequest, GenericError]]:
 | 
			
		||||
    """Get Consent Request Information
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ConsentRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ConsentRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,199 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JSONWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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, JSONWebKeySet]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Fetch a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Fetch a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Fetch a JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,249 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.login_request import LoginRequest
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LoginRequest]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = LoginRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    if response.status_code == HTTPStatus.CONFLICT:
 | 
			
		||||
        response_409 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_409
 | 
			
		||||
    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, LoginRequest]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, LoginRequest]]:
 | 
			
		||||
    """Get a Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LoginRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, LoginRequest]]:
 | 
			
		||||
    """Get a Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LoginRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, LoginRequest]]:
 | 
			
		||||
    """Get a Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LoginRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LoginRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,193 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, LogoutRequest]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = LogoutRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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, LogoutRequest]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, LogoutRequest]]:
 | 
			
		||||
    """Get a Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch a logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LogoutRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, LogoutRequest]]:
 | 
			
		||||
    """Get a Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch a logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LogoutRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, LogoutRequest]]:
 | 
			
		||||
    """Get a Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch a logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LogoutRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch a logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, LogoutRequest]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,206 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth2Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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, OAuth2Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Get an OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
     Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Get an OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
     Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Get an OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
     Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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.
 | 
			
		||||
 | 
			
		||||
     Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,164 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.version import Version
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/version".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Version]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = Version.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, response: httpx.Response) -> Response[Version]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Version]:
 | 
			
		||||
    """Get Service Version
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the service version typically notated using semantic versioning.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Version]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Version]:
 | 
			
		||||
    """Get Service Version
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the service version typically notated using semantic versioning.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Version]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Version]:
 | 
			
		||||
    """Get Service Version
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the service version typically notated using semantic versioning.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Version]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Version]:
 | 
			
		||||
    """Get Service Version
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the service version typically notated using semantic versioning.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Version]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,194 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth2TokenIntrospection.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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, OAuth2TokenIntrospection]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
 | 
			
		||||
    """Introspect OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `accessTokenExtra` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-
 | 
			
		||||
    endpoint/).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2TokenIntrospection]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
 | 
			
		||||
    """Introspect OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `accessTokenExtra` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-
 | 
			
		||||
    endpoint/).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2TokenIntrospection]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2TokenIntrospection]]:
 | 
			
		||||
    """Introspect OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `accessTokenExtra` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-
 | 
			
		||||
    endpoint/).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2TokenIntrospection]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, OAuth2TokenIntrospection]]:
 | 
			
		||||
    """Introspect OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `accessTokenExtra` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-
 | 
			
		||||
    endpoint/).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2TokenIntrospection]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,260 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Optional
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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):
 | 
			
		||||
            response_200_item = OAuth2Client.from_dict(response_200_item_data)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            response_200.append(response_200_item)
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    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']]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    limit: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    offset: Union[Unset, None, int] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> 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
 | 
			
		||||
    lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has
 | 
			
		||||
    an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        limit (Union[Unset, None, int]):
 | 
			
		||||
        offset (Union[Unset, None, int]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['OAuth2Client']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
limit=limit,
 | 
			
		||||
offset=offset,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    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']]]:
 | 
			
		||||
    """List OAuth 2.0 Clients
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all clients in the database, and never returns client secrets. As a default it
 | 
			
		||||
    lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has
 | 
			
		||||
    an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        limit (Union[Unset, None, int]):
 | 
			
		||||
        offset (Union[Unset, None, int]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['OAuth2Client']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
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']]]:
 | 
			
		||||
    """List OAuth 2.0 Clients
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all clients in the database, and never returns client secrets. As a default it
 | 
			
		||||
    lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has
 | 
			
		||||
    an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        limit (Union[Unset, None, int]):
 | 
			
		||||
        offset (Union[Unset, None, int]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['OAuth2Client']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
limit=limit,
 | 
			
		||||
offset=offset,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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']]]:
 | 
			
		||||
    """List OAuth 2.0 Clients
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all clients in the database, and never returns client secrets. As a default it
 | 
			
		||||
    lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has
 | 
			
		||||
    an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        limit (Union[Unset, None, int]):
 | 
			
		||||
        offset (Union[Unset, None, int]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['OAuth2Client']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
limit=limit,
 | 
			
		||||
offset=offset,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,239 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.previous_consent_session import PreviousConsentSession
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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):
 | 
			
		||||
            response_200_item = PreviousConsentSession.from_dict(response_200_item_data)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            response_200.append(response_200_item)
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    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']]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> 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.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-
 | 
			
		||||
    url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['PreviousConsentSession']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> 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.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-
 | 
			
		||||
    url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['PreviousConsentSession']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> 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.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-
 | 
			
		||||
    url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['PreviousConsentSession']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> 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.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    The \"Link\" header is also included in successful responses, which contains one or more links for
 | 
			
		||||
    pagination, formatted like so: '<https://hydra-
 | 
			
		||||
    url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>;
 | 
			
		||||
    rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and
 | 
			
		||||
    'previous'.
 | 
			
		||||
    Multiple links can be included in this header, and will be separated by a comma.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, List['PreviousConsentSession']]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,125 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=None,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Get Snapshot Metrics from the Hydra Service.
 | 
			
		||||
 | 
			
		||||
     If you're using k8s, you can then add annotations to your deployment like so:
 | 
			
		||||
 | 
			
		||||
    ```
 | 
			
		||||
    metadata:
 | 
			
		||||
    annotations:
 | 
			
		||||
    prometheus.io/port: \"4445\"
 | 
			
		||||
    prometheus.io/path: \"/metrics/prometheus\"
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Get Snapshot Metrics from the Hydra Service.
 | 
			
		||||
 | 
			
		||||
     If you're using k8s, you can then add annotations to your deployment like so:
 | 
			
		||||
 | 
			
		||||
    ```
 | 
			
		||||
    metadata:
 | 
			
		||||
    annotations:
 | 
			
		||||
    prometheus.io/port: \"4445\"
 | 
			
		||||
    prometheus.io/path: \"/metrics/prometheus\"
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,298 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = CompletedRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[CompletedRequest, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,222 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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_json_body = json_body.to_dict()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "put",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Reject a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Reject a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Reject a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Reject a Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny
 | 
			
		||||
    that logout request.
 | 
			
		||||
    No body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,215 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work
 | 
			
		||||
    with OpenID Connect
 | 
			
		||||
    Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work
 | 
			
		||||
    with OpenID Connect
 | 
			
		||||
    Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work
 | 
			
		||||
    with OpenID Connect
 | 
			
		||||
    Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work
 | 
			
		||||
    with OpenID Connect
 | 
			
		||||
    Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,238 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 Optional
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    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)
 | 
			
		||||
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        response_204 = cast(Any, None)
 | 
			
		||||
        return response_204
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and
 | 
			
		||||
    invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and
 | 
			
		||||
    invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and
 | 
			
		||||
    invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and
 | 
			
		||||
    invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,224 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth2Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    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, OAuth2Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Update an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and
 | 
			
		||||
    returned via the API. This is the only time you will be able to retrieve the client secret, so write
 | 
			
		||||
    it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth2Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, OAuth2Client]]:
 | 
			
		||||
    """Update an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and
 | 
			
		||||
    returned via the API. This is the only time you will be able to retrieve the client secret, so write
 | 
			
		||||
    it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_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
 | 
			
		||||
 | 
			
		||||
     Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and
 | 
			
		||||
    returned via the API. This is the only time you will be able to retrieve the client secret, so write
 | 
			
		||||
    it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and
 | 
			
		||||
    returned via the API. This is the only time you will be able to retrieve the client secret, so write
 | 
			
		||||
    it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
    To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well
 | 
			
		||||
    protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth2Client):
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, OAuth2Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,15 +1,16 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
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 typing import Dict
 | 
			
		||||
from ...models.json_web_key_set import JsonWebKeySet
 | 
			
		||||
from ...models.create_json_web_key_set import CreateJsonWebKeySet
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -17,10 +18,10 @@ def _get_kwargs(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JsonWebKeySetGeneratorRequest,
 | 
			
		||||
    json_body: CreateJsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/keys/{set}".format(
 | 
			
		||||
    url = "{}/admin/keys/{set}".format(
 | 
			
		||||
        _client.base_url,set=set_)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -48,40 +49,25 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    if response.status_code == HTTPStatus.CREATED:
 | 
			
		||||
        response_201 = JSONWebKeySet.from_dict(response.json())
 | 
			
		||||
        response_201 = JsonWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_201
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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, JSONWebKeySet]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKeySet]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -89,10 +75,10 @@ def sync_detailed(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JsonWebKeySetGeneratorRequest,
 | 
			
		||||
    json_body: CreateJsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Generate a New JSON Web Key
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Create JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies
 | 
			
		||||
    available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys
 | 
			
		||||
| 
						 | 
				
			
			@ -106,10 +92,14 @@ def sync_detailed(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (JsonWebKeySetGeneratorRequest):
 | 
			
		||||
        json_body (CreateJsonWebKeySet): Create JSON Web Key Set Request Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -125,16 +115,16 @@ json_body=json_body,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JsonWebKeySetGeneratorRequest,
 | 
			
		||||
    json_body: CreateJsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Generate a New JSON Web Key
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Create JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies
 | 
			
		||||
    available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys
 | 
			
		||||
| 
						 | 
				
			
			@ -148,10 +138,14 @@ def sync(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (JsonWebKeySetGeneratorRequest):
 | 
			
		||||
        json_body (CreateJsonWebKeySet): Create JSON Web Key Set Request Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -166,10 +160,10 @@ async def asyncio_detailed(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JsonWebKeySetGeneratorRequest,
 | 
			
		||||
    json_body: CreateJsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Generate a New JSON Web Key
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Create JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies
 | 
			
		||||
    available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys
 | 
			
		||||
| 
						 | 
				
			
			@ -183,10 +177,14 @@ async def asyncio_detailed(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (JsonWebKeySetGeneratorRequest):
 | 
			
		||||
        json_body (CreateJsonWebKeySet): Create JSON Web Key Set Request Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -202,16 +200,16 @@ json_body=json_body,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JsonWebKeySetGeneratorRequest,
 | 
			
		||||
    json_body: CreateJsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """Generate a New JSON Web Key
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Create JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies
 | 
			
		||||
    available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys
 | 
			
		||||
| 
						 | 
				
			
			@ -225,10 +223,14 @@ async def asyncio(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (JsonWebKeySetGeneratorRequest):
 | 
			
		||||
        json_body (CreateJsonWebKeySet): Create JSON Web Key Set Request Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,156 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A
 | 
			
		||||
    JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its
 | 
			
		||||
    set and key id. ORY Hydra uses
 | 
			
		||||
    this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID
 | 
			
		||||
    Connect ID tokens),
 | 
			
		||||
    and allows storing user-defined keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a single JSON Web Key.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A
 | 
			
		||||
    JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its
 | 
			
		||||
    set and key id. ORY Hydra uses
 | 
			
		||||
    this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID
 | 
			
		||||
    Connect ID tokens),
 | 
			
		||||
    and allows storing user-defined keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,145 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.
 | 
			
		||||
 | 
			
		||||
    A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a
 | 
			
		||||
    cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key
 | 
			
		||||
    is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys
 | 
			
		||||
    used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined
 | 
			
		||||
    keys as well.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,211 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_web_key_set import JsonWebKeySet
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JsonWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKeySet]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Get JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and
 | 
			
		||||
    the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Get JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and
 | 
			
		||||
    the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Get JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and
 | 
			
		||||
    the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Get JSON Web Key
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and
 | 
			
		||||
    the specific key ID (kid).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        set_=set_,
 | 
			
		||||
kid=kid,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +1,15 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from ...models.json_web_key_set import JSONWebKeySet
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_web_key_set import JsonWebKeySet
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +19,7 @@ def _get_kwargs(
 | 
			
		|||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/keys/{set}".format(
 | 
			
		||||
    url = "{}/admin/keys/{set}".format(
 | 
			
		||||
        _client.base_url,set=set_)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -43,40 +44,25 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JSONWebKeySet.from_dict(response.json())
 | 
			
		||||
        response_200 = JsonWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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, JSONWebKeySet]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKeySet]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -85,7 +71,7 @@ def sync_detailed(
 | 
			
		|||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Retrieve a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.
 | 
			
		||||
| 
						 | 
				
			
			@ -99,8 +85,12 @@ def sync_detailed(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -115,14 +105,14 @@ _client=_client,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Retrieve a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.
 | 
			
		||||
| 
						 | 
				
			
			@ -136,8 +126,12 @@ def sync(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -152,7 +146,7 @@ async def asyncio_detailed(
 | 
			
		|||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Retrieve a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.
 | 
			
		||||
| 
						 | 
				
			
			@ -166,8 +160,12 @@ async def asyncio_detailed(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -182,14 +180,14 @@ _client=_client,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Retrieve a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.
 | 
			
		||||
| 
						 | 
				
			
			@ -203,8 +201,12 @@ async def asyncio(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +1,15 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.json_web_key import JSONWebKey
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_web_key import JsonWebKey
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -17,10 +18,10 @@ def _get_kwargs(
 | 
			
		|||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKey,
 | 
			
		||||
    json_body: JsonWebKey,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/keys/{set}/{kid}".format(
 | 
			
		||||
    url = "{}/admin/keys/{set}/{kid}".format(
 | 
			
		||||
        _client.base_url,set=set_,kid=kid)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -48,40 +49,25 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKey]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKey]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JSONWebKey.from_dict(response.json())
 | 
			
		||||
        response_200 = JsonWebKey.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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, JSONWebKey]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKey]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -90,10 +76,10 @@ def sync_detailed(
 | 
			
		|||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKey,
 | 
			
		||||
    json_body: JsonWebKey,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKey]]:
 | 
			
		||||
    """Update a JSON Web Key
 | 
			
		||||
) -> Response[JsonWebKey]:
 | 
			
		||||
    """Set JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
    own.
 | 
			
		||||
| 
						 | 
				
			
			@ -107,12 +93,14 @@ def sync_detailed(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
        json_body (JSONWebKey): It is important that this model object is named JSONWebKey for
 | 
			
		||||
            "swagger generate spec" to generate only on definition of a
 | 
			
		||||
            JSONWebKey.
 | 
			
		||||
        json_body (JsonWebKey):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKey]]
 | 
			
		||||
        Response[JsonWebKey]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -129,17 +117,17 @@ json_body=json_body,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKey,
 | 
			
		||||
    json_body: JsonWebKey,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKey]]:
 | 
			
		||||
    """Update a JSON Web Key
 | 
			
		||||
) -> Optional[JsonWebKey]:
 | 
			
		||||
    """Set JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
    own.
 | 
			
		||||
| 
						 | 
				
			
			@ -153,12 +141,14 @@ def sync(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
        json_body (JSONWebKey): It is important that this model object is named JSONWebKey for
 | 
			
		||||
            "swagger generate spec" to generate only on definition of a
 | 
			
		||||
            JSONWebKey.
 | 
			
		||||
        json_body (JsonWebKey):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKey]]
 | 
			
		||||
        Response[JsonWebKey]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -175,10 +165,10 @@ async def asyncio_detailed(
 | 
			
		|||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKey,
 | 
			
		||||
    json_body: JsonWebKey,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKey]]:
 | 
			
		||||
    """Update a JSON Web Key
 | 
			
		||||
) -> Response[JsonWebKey]:
 | 
			
		||||
    """Set JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
    own.
 | 
			
		||||
| 
						 | 
				
			
			@ -192,12 +182,14 @@ async def asyncio_detailed(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
        json_body (JSONWebKey): It is important that this model object is named JSONWebKey for
 | 
			
		||||
            "swagger generate spec" to generate only on definition of a
 | 
			
		||||
            JSONWebKey.
 | 
			
		||||
        json_body (JsonWebKey):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKey]]
 | 
			
		||||
        Response[JsonWebKey]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -214,17 +206,17 @@ json_body=json_body,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    kid: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKey,
 | 
			
		||||
    json_body: JsonWebKey,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKey]]:
 | 
			
		||||
    """Update a JSON Web Key
 | 
			
		||||
) -> Optional[JsonWebKey]:
 | 
			
		||||
    """Set JSON Web Key
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
    own.
 | 
			
		||||
| 
						 | 
				
			
			@ -238,12 +230,14 @@ async def asyncio(
 | 
			
		|||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        kid (str):
 | 
			
		||||
        json_body (JSONWebKey): It is important that this model object is named JSONWebKey for
 | 
			
		||||
            "swagger generate spec" to generate only on definition of a
 | 
			
		||||
            JSONWebKey.
 | 
			
		||||
        json_body (JsonWebKey):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKey]]
 | 
			
		||||
        Response[JsonWebKey]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +1,15 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.json_web_key_set import JSONWebKeySet
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_web_key_set import JsonWebKeySet
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -16,10 +17,10 @@ def _get_kwargs(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKeySet,
 | 
			
		||||
    json_body: JsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/keys/{set}".format(
 | 
			
		||||
    url = "{}/admin/keys/{set}".format(
 | 
			
		||||
        _client.base_url,set=set_)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -47,40 +48,25 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JSONWebKeySet.from_dict(response.json())
 | 
			
		||||
        response_200 = JsonWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.FORBIDDEN:
 | 
			
		||||
        response_403 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_403
 | 
			
		||||
    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, JSONWebKeySet]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKeySet]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -88,9 +74,9 @@ def sync_detailed(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKeySet,
 | 
			
		||||
    json_body: JsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Update a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
| 
						 | 
				
			
			@ -104,15 +90,14 @@ def sync_detailed(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (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.
 | 
			
		||||
        json_body (JsonWebKeySet): JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -128,15 +113,15 @@ json_body=json_body,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKeySet,
 | 
			
		||||
    json_body: JsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Update a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
| 
						 | 
				
			
			@ -150,15 +135,14 @@ def sync(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (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.
 | 
			
		||||
        json_body (JsonWebKeySet): JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -173,9 +157,9 @@ async def asyncio_detailed(
 | 
			
		|||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKeySet,
 | 
			
		||||
    json_body: JsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Update a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
| 
						 | 
				
			
			@ -189,15 +173,14 @@ async def asyncio_detailed(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (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.
 | 
			
		||||
        json_body (JsonWebKeySet): JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -213,15 +196,15 @@ json_body=json_body,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    set_: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: JSONWebKeySet,
 | 
			
		||||
    json_body: JsonWebKeySet,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Update a JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
     Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your
 | 
			
		||||
| 
						 | 
				
			
			@ -235,15 +218,14 @@ async def asyncio(
 | 
			
		|||
 | 
			
		||||
    Args:
 | 
			
		||||
        set_ (str):
 | 
			
		||||
        json_body (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.
 | 
			
		||||
        json_body (JsonWebKeySet): JSON Web Key Set
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +1,15 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.health_status import HealthStatus
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.health_not_ready_status import HealthNotReadyStatus
 | 
			
		||||
from ...models.get_version_response_200 import GetVersionResponse200
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +18,7 @@ def _get_kwargs(
 | 
			
		|||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/health/ready".format(
 | 
			
		||||
    url = "{}/version".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -42,28 +43,25 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[GetVersionResponse200]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = HealthStatus.from_dict(response.json())
 | 
			
		||||
        response_200 = GetVersionResponse200.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE:
 | 
			
		||||
        response_503 = HealthNotReadyStatus.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_503
 | 
			
		||||
    return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, response: httpx.Response) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[GetVersionResponse200]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -71,21 +69,23 @@ def sync_detailed(
 | 
			
		|||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
    """Check Readiness Status
 | 
			
		||||
) -> Response[GetVersionResponse200]:
 | 
			
		||||
    """Return Running Software Version.
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
     This endpoint returns the version of Ory Hydra.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the version will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[HealthNotReadyStatus, HealthStatus]]
 | 
			
		||||
        Response[GetVersionResponse200]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -99,27 +99,29 @@ def sync_detailed(
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
    """Check Readiness Status
 | 
			
		||||
) -> Optional[GetVersionResponse200]:
 | 
			
		||||
    """Return Running Software Version.
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
     This endpoint returns the version of Ory Hydra.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the version will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[HealthNotReadyStatus, HealthStatus]]
 | 
			
		||||
        Response[GetVersionResponse200]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -132,21 +134,23 @@ async def asyncio_detailed(
 | 
			
		|||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
    """Check Readiness Status
 | 
			
		||||
) -> Response[GetVersionResponse200]:
 | 
			
		||||
    """Return Running Software Version.
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
     This endpoint returns the version of Ory Hydra.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the version will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[HealthNotReadyStatus, HealthStatus]]
 | 
			
		||||
        Response[GetVersionResponse200]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -160,27 +164,29 @@ async def asyncio_detailed(
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[HealthNotReadyStatus, HealthStatus]]:
 | 
			
		||||
    """Check Readiness Status
 | 
			
		||||
) -> Optional[GetVersionResponse200]:
 | 
			
		||||
    """Return Running Software Version.
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
     This endpoint returns the version of Ory Hydra.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    Be aware that if you are running multiple nodes of this service, the version will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[HealthNotReadyStatus, HealthStatus]]
 | 
			
		||||
        Response[GetVersionResponse200]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +1,16 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from ...models.health_status import HealthStatus
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +44,7 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, HealthStatus]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = HealthStatus.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -55,15 +57,18 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError,
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
        return response_500
 | 
			
		||||
    return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, response: httpx.Response) -> Response[Union[GenericError, HealthStatus]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -72,10 +77,11 @@ def sync_detailed(
 | 
			
		|||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    """Check Alive Status
 | 
			
		||||
    """Check HTTP Server Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running.
 | 
			
		||||
    This status does currently not include checks whether the database connection is working.
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming
 | 
			
		||||
    HTTP requests. This status does currently not include checks whether the database connection is
 | 
			
		||||
    working.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
| 
						 | 
				
			
			@ -83,6 +89,10 @@ def sync_detailed(
 | 
			
		|||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, HealthStatus]]
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			@ -98,17 +108,18 @@ def sync_detailed(
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    """Check Alive Status
 | 
			
		||||
    """Check HTTP Server Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running.
 | 
			
		||||
    This status does currently not include checks whether the database connection is working.
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming
 | 
			
		||||
    HTTP requests. This status does currently not include checks whether the database connection is
 | 
			
		||||
    working.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
| 
						 | 
				
			
			@ -116,6 +127,10 @@ def sync(
 | 
			
		|||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, HealthStatus]]
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			@ -131,10 +146,11 @@ async def asyncio_detailed(
 | 
			
		|||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    """Check Alive Status
 | 
			
		||||
    """Check HTTP Server Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running.
 | 
			
		||||
    This status does currently not include checks whether the database connection is working.
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming
 | 
			
		||||
    HTTP requests. This status does currently not include checks whether the database connection is
 | 
			
		||||
    working.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
| 
						 | 
				
			
			@ -142,6 +158,10 @@ async def asyncio_detailed(
 | 
			
		|||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, HealthStatus]]
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			@ -157,17 +177,18 @@ async def asyncio_detailed(
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, HealthStatus]]:
 | 
			
		||||
    """Check Alive Status
 | 
			
		||||
    """Check HTTP Server Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a 200 status code when the HTTP server is up running.
 | 
			
		||||
    This status does currently not include checks whether the database connection is working.
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming
 | 
			
		||||
    HTTP requests. This status does currently not include checks whether the database connection is
 | 
			
		||||
    working.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
| 
						 | 
				
			
			@ -175,6 +196,10 @@ async def asyncio(
 | 
			
		|||
    Be aware that if you are running multiple nodes of this service, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, HealthStatus]]
 | 
			
		||||
    """
 | 
			
		||||
							
								
								
									
										212
									
								
								libs/ory-hydra-client/ory_hydra_client/api/metadata/is_ready.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								libs/ory-hydra-client/ory_hydra_client/api/metadata/is_ready.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,212 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.is_ready_response_200 import IsReadyResponse200
 | 
			
		||||
from ...models.is_ready_response_503 import IsReadyResponse503
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/health/ready".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = IsReadyResponse200.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE:
 | 
			
		||||
        response_503 = IsReadyResponse503.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_503
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    """Check HTTP Server and Database Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of Ory Hydra, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[IsReadyResponse200, IsReadyResponse503]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    """Check HTTP Server and Database Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of Ory Hydra, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[IsReadyResponse200, IsReadyResponse503]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    """Check HTTP Server and Database Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of Ory Hydra, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[IsReadyResponse200, IsReadyResponse503]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[IsReadyResponse200, IsReadyResponse503]]:
 | 
			
		||||
    """Check HTTP Server and Database Status
 | 
			
		||||
 | 
			
		||||
     This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment
 | 
			
		||||
    dependencies (e.g.
 | 
			
		||||
    the database) are responsive as well.
 | 
			
		||||
 | 
			
		||||
    If the service supports TLS Edge Termination, this endpoint does not require the
 | 
			
		||||
    `X-Forwarded-Proto` header to be set.
 | 
			
		||||
 | 
			
		||||
    Be aware that if you are running multiple nodes of Ory Hydra, the health status will never
 | 
			
		||||
    refer to the cluster state, only to a single instance.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[IsReadyResponse200, IsReadyResponse503]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,26 +1,27 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from ...models.the_request_payload_used_to_accept_a_consent_request import TheRequestPayloadUsedToAcceptAConsentRequest
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.completed_request import CompletedRequest
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from ...models.accept_consent_request import AcceptConsentRequest
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptConsentRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptAConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/auth/requests/consent/accept".format(
 | 
			
		||||
    url = "{}/admin/oauth2/auth/requests/consent/accept".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -55,78 +56,72 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = CompletedRequest.from_dict(response.json())
 | 
			
		||||
        response_200 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[CompletedRequest, GenericError]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptConsentRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptAConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Consent Request
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on
 | 
			
		||||
    his/her behalf.
 | 
			
		||||
    The consent provider includes additional information, such as session data for access and ID tokens,
 | 
			
		||||
    and if the
 | 
			
		||||
    consent request should be used as basis for future requests.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (AcceptConsentRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptAConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -142,49 +137,52 @@ consent_challenge=consent_challenge,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptConsentRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptAConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Consent Request
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on
 | 
			
		||||
    his/her behalf.
 | 
			
		||||
    The consent provider includes additional information, such as session data for access and ID tokens,
 | 
			
		||||
    and if the
 | 
			
		||||
    consent request should be used as basis for future requests.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (AcceptConsentRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptAConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -198,44 +196,47 @@ consent_challenge=consent_challenge,
 | 
			
		|||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptConsentRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptAConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Consent Request
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on
 | 
			
		||||
    his/her behalf.
 | 
			
		||||
    The consent provider includes additional information, such as session data for access and ID tokens,
 | 
			
		||||
    and if the
 | 
			
		||||
    consent request should be used as basis for future requests.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (AcceptConsentRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptAConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -251,49 +252,52 @@ consent_challenge=consent_challenge,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: AcceptConsentRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptAConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Accept a Consent Request
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated,
 | 
			
		||||
    he/she must now be asked if
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent provider which handles this request and is a web app implemented and hosted by you. It
 | 
			
		||||
    shows a subject interface which asks the subject to
 | 
			
		||||
    grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write
 | 
			
		||||
    access to all your private files\").
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if
 | 
			
		||||
    the subject accepted
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access
 | 
			
		||||
    resources on his/her behalf.
 | 
			
		||||
    This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on
 | 
			
		||||
    his/her behalf.
 | 
			
		||||
    The consent provider includes additional information, such as session data for access and ID tokens,
 | 
			
		||||
    and if the
 | 
			
		||||
    consent request should be used as basis for future requests.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (AcceptConsentRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptAConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,278 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.handled_login_request_is_the_request_payload_used_to_accept_a_login_request import HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has successfully authenticated and includes additional
 | 
			
		||||
    information such as
 | 
			
		||||
    the subject's ID and if Ory should remember the subject's subject agent for future authentication
 | 
			
		||||
    attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has successfully authenticated and includes additional
 | 
			
		||||
    information such as
 | 
			
		||||
    the subject's ID and if Ory should remember the subject's subject agent for future authentication
 | 
			
		||||
    attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has successfully authenticated and includes additional
 | 
			
		||||
    information such as
 | 
			
		||||
    the subject's ID and if Ory should remember the subject's subject agent for future authentication
 | 
			
		||||
    attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has successfully authenticated and includes additional
 | 
			
		||||
    information such as
 | 
			
		||||
    the subject's ID and if Ory should remember the subject's subject agent for future authentication
 | 
			
		||||
    attempts by setting
 | 
			
		||||
    a cookie.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (HandledLoginRequestIsTheRequestPayloadUsedToAcceptALoginRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,213 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to confirm that logout request.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to confirm that logout request.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to confirm that logout request.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Accept OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to confirm that logout request.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,220 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.CREATED:
 | 
			
		||||
        response_201 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_201
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = cast(Any, None)
 | 
			
		||||
        return response_400
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Create OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random
 | 
			
		||||
    secret
 | 
			
		||||
    is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Create OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random
 | 
			
		||||
    secret
 | 
			
		||||
    is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Create OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random
 | 
			
		||||
    secret
 | 
			
		||||
    is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Create OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random
 | 
			
		||||
    secret
 | 
			
		||||
    is generated. The secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,145 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Make sure that this endpoint is well protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Delete an existing OAuth 2.0 Client by its ID.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Make sure that this endpoint is well protected and only callable by first-party components.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,140 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    client_id: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    client_id: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
client_id=client_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    client_id: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        client_id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
client_id=client_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,145 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/trust/grants/jwt-bearer/issuers/{id}".format(
 | 
			
		||||
        _client.base_url,id=id)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "delete",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when
 | 
			
		||||
    you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT)
 | 
			
		||||
    Profile
 | 
			
		||||
    for OAuth 2.0 Client Authentication and Authorization Grant.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when
 | 
			
		||||
    you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT)
 | 
			
		||||
    Profile
 | 
			
		||||
    for OAuth 2.0 Client Authentication and Authorization Grant.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,210 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20Client]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20Client]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Get an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Get an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Get an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Get an OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,268 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from ...models.contains_information_on_an_ongoing_consent_request import ContainsInformationOnAnOngoingConsentRequest
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = ContainsInformationOnAnOngoingConsentRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.GONE:
 | 
			
		||||
        response_410 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_410
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingConsentRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,256 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.contains_information_on_an_ongoing_login_request import ContainsInformationOnAnOngoingLoginRequest
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = ContainsInformationOnAnOngoingLoginRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.GONE:
 | 
			
		||||
        response_410 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_410
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    Per default, the login provider is Ory itself. You may use a different login provider which needs to
 | 
			
		||||
    be a web-app
 | 
			
		||||
    you write and host, and it must be able to authenticate (\"show the subject a login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    Per default, the login provider is Ory itself. You may use a different login provider which needs to
 | 
			
		||||
    be a web-app
 | 
			
		||||
    you write and host, and it must be able to authenticate (\"show the subject a login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    Per default, the login provider is Ory itself. You may use a different login provider which needs to
 | 
			
		||||
    be a web-app
 | 
			
		||||
    you write and host, and it must be able to authenticate (\"show the subject a login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    Per default, the login provider is Ory itself. You may use a different login provider which needs to
 | 
			
		||||
    be a web-app
 | 
			
		||||
    you write and host, and it must be able to authenticate (\"show the subject a login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationOnAnOngoingLoginRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
login_challenge=login_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,208 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.contains_information_about_an_ongoing_logout_request import ContainsInformationAboutAnOngoingLogoutRequest
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = ContainsInformationAboutAnOngoingLogoutRequest.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.GONE:
 | 
			
		||||
        response_410 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_410
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch an Ory OAuth 2.0 logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch an Ory OAuth 2.0 logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch an Ory OAuth 2.0 logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]:
 | 
			
		||||
    """Get OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to fetch an Ory OAuth 2.0 logout request.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[ContainsInformationAboutAnOngoingLogoutRequest, OAuth20RedirectBrowserTo]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,198 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.trusted_o_auth_2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/trust/grants/jwt-bearer/issuers/{id}".format(
 | 
			
		||||
        _client.base_url,id=id)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = TrustedOAuth2JwtGrantIssuer.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Get Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Get Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Get Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Get Trusted OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you
 | 
			
		||||
    created the trust relationship.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,200 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.introspected_o_auth_2_token import IntrospectedOAuth2Token
 | 
			
		||||
from ...models.introspect_o_auth_2_token_data import IntrospectOAuth2TokenData
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    form_data: IntrospectOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/oauth2/introspect".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "data": form_data.to_dict(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[IntrospectedOAuth2Token]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = IntrospectedOAuth2Token.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[IntrospectedOAuth2Token]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    form_data: IntrospectOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Response[IntrospectedOAuth2Token]:
 | 
			
		||||
    """Introspect OAuth2 Access and Refresh Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `session.access_token` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[IntrospectedOAuth2Token]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    form_data: IntrospectOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Optional[IntrospectedOAuth2Token]:
 | 
			
		||||
    """Introspect OAuth2 Access and Refresh Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `session.access_token` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[IntrospectedOAuth2Token]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    form_data: IntrospectOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Response[IntrospectedOAuth2Token]:
 | 
			
		||||
    """Introspect OAuth2 Access and Refresh Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `session.access_token` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[IntrospectedOAuth2Token]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    form_data: IntrospectOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Optional[IntrospectedOAuth2Token]:
 | 
			
		||||
    """Introspect OAuth2 Access and Refresh Tokens
 | 
			
		||||
 | 
			
		||||
     The introspection endpoint allows to check if a token (both refresh and access) is active or not. An
 | 
			
		||||
    active token
 | 
			
		||||
    is neither expired nor revoked. If a token is active, additional information on the token will be
 | 
			
		||||
    included. You can
 | 
			
		||||
    set additional data for a token by setting `session.access_token` during the consent flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[IntrospectedOAuth2Token]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,175 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...types import UNSET, Unset
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from typing import Union
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    client_name: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    owner: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/clients".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    params: Dict[str, Any] = {}
 | 
			
		||||
    params["page_size"] = page_size
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["page_token"] = page_token
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["client_name"] = client_name
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["owner"] = owner
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    client_name: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    owner: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """List OAuth 2.0 Clients
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all clients in the database, and never returns client secrets.
 | 
			
		||||
    As a default it lists the first 100 clients.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        client_name (Union[Unset, None, str]):
 | 
			
		||||
        owner (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
client_name=client_name,
 | 
			
		||||
owner=owner,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    client_name: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    owner: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """List OAuth 2.0 Clients
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all clients in the database, and never returns client secrets.
 | 
			
		||||
    As a default it lists the first 100 clients.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        client_name (Union[Unset, None, str]):
 | 
			
		||||
        owner (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
client_name=client_name,
 | 
			
		||||
owner=owner,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,266 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...types import UNSET, Unset
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from typing import Union
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.o_auth_20_consent_session import OAuth20ConsentSession
 | 
			
		||||
from typing import cast, List
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    subject: str,
 | 
			
		||||
    login_session_id: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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["page_size"] = page_size
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["page_token"] = page_token
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["subject"] = subject
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["login_session_id"] = login_session_id
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List['OAuth20ConsentSession']]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = []
 | 
			
		||||
        _response_200 = response.json()
 | 
			
		||||
        for componentsschemaso_auth_2_consent_sessions_item_data in (_response_200):
 | 
			
		||||
            componentsschemaso_auth_2_consent_sessions_item = OAuth20ConsentSession.from_dict(componentsschemaso_auth_2_consent_sessions_item_data)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            response_200.append(componentsschemaso_auth_2_consent_sessions_item)
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[List['OAuth20ConsentSession']]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    subject: str,
 | 
			
		||||
    login_session_id: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[List['OAuth20ConsentSession']]:
 | 
			
		||||
    """List OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all subject's granted consent sessions, including client and granted scope.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        subject (str):
 | 
			
		||||
        login_session_id (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['OAuth20ConsentSession']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
subject=subject,
 | 
			
		||||
login_session_id=login_session_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    subject: str,
 | 
			
		||||
    login_session_id: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Optional[List['OAuth20ConsentSession']]:
 | 
			
		||||
    """List OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all subject's granted consent sessions, including client and granted scope.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        subject (str):
 | 
			
		||||
        login_session_id (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['OAuth20ConsentSession']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
subject=subject,
 | 
			
		||||
login_session_id=login_session_id,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    subject: str,
 | 
			
		||||
    login_session_id: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[List['OAuth20ConsentSession']]:
 | 
			
		||||
    """List OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all subject's granted consent sessions, including client and granted scope.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        subject (str):
 | 
			
		||||
        login_session_id (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['OAuth20ConsentSession']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
subject=subject,
 | 
			
		||||
login_session_id=login_session_id,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    page_size: Union[Unset, None, int] = 250,
 | 
			
		||||
    page_token: Union[Unset, None, str] = '1',
 | 
			
		||||
    subject: str,
 | 
			
		||||
    login_session_id: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Optional[List['OAuth20ConsentSession']]:
 | 
			
		||||
    """List OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint lists all subject's granted consent sessions, including client and granted scope.
 | 
			
		||||
    If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an
 | 
			
		||||
    empty JSON array with status code 200 OK.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        page_size (Union[Unset, None, int]):  Default: 250.
 | 
			
		||||
        page_token (Union[Unset, None, str]):  Default: '1'.
 | 
			
		||||
        subject (str):
 | 
			
		||||
        login_session_id (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['OAuth20ConsentSession']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
page_size=page_size,
 | 
			
		||||
page_token=page_token,
 | 
			
		||||
subject=subject,
 | 
			
		||||
login_session_id=login_session_id,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,242 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...types import UNSET, Unset
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from typing import Union
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast, List
 | 
			
		||||
from ...models.trusted_o_auth_2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    max_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    default_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    issuer: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/trust/grants/jwt-bearer/issuers".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    params: Dict[str, Any] = {}
 | 
			
		||||
    params["MaxItems"] = max_items
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["DefaultItems"] = default_items
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params["issuer"] = issuer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = []
 | 
			
		||||
        _response_200 = response.json()
 | 
			
		||||
        for componentsschemastrusted_o_auth_2_jwt_grant_issuers_item_data in (_response_200):
 | 
			
		||||
            componentsschemastrusted_o_auth_2_jwt_grant_issuers_item = TrustedOAuth2JwtGrantIssuer.from_dict(componentsschemastrusted_o_auth_2_jwt_grant_issuers_item_data)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            response_200.append(componentsschemastrusted_o_auth_2_jwt_grant_issuers_item)
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    max_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    default_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    issuer: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    """List Trusted OAuth2 JWT Bearer Grant Type Issuers
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        max_items (Union[Unset, None, int]):
 | 
			
		||||
        default_items (Union[Unset, None, int]):
 | 
			
		||||
        issuer (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['TrustedOAuth2JwtGrantIssuer']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
max_items=max_items,
 | 
			
		||||
default_items=default_items,
 | 
			
		||||
issuer=issuer,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    max_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    default_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    issuer: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Optional[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    """List Trusted OAuth2 JWT Bearer Grant Type Issuers
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        max_items (Union[Unset, None, int]):
 | 
			
		||||
        default_items (Union[Unset, None, int]):
 | 
			
		||||
        issuer (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['TrustedOAuth2JwtGrantIssuer']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
max_items=max_items,
 | 
			
		||||
default_items=default_items,
 | 
			
		||||
issuer=issuer,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    max_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    default_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    issuer: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    """List Trusted OAuth2 JWT Bearer Grant Type Issuers
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        max_items (Union[Unset, None, int]):
 | 
			
		||||
        default_items (Union[Unset, None, int]):
 | 
			
		||||
        issuer (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['TrustedOAuth2JwtGrantIssuer']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
max_items=max_items,
 | 
			
		||||
default_items=default_items,
 | 
			
		||||
issuer=issuer,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    max_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    default_items: Union[Unset, None, int] = UNSET,
 | 
			
		||||
    issuer: Union[Unset, None, str] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Optional[List['TrustedOAuth2JwtGrantIssuer']]:
 | 
			
		||||
    """List Trusted OAuth2 JWT Bearer Grant Type Issuers
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        max_items (Union[Unset, None, int]):
 | 
			
		||||
        default_items (Union[Unset, None, int]):
 | 
			
		||||
        issuer (Union[Unset, None, str]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[List['TrustedOAuth2JwtGrantIssuer']]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
max_items=max_items,
 | 
			
		||||
default_items=default_items,
 | 
			
		||||
issuer=issuer,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,128 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/auth".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.FOUND:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OAuth 2.0 Authorize Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries at https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OAuth 2.0 Authorize Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries at https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,200 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_2_token_exchange import OAuth2TokenExchange
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.oauth_2_token_exchange_data import Oauth2TokenExchangeData
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: Oauth2TokenExchangeData,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/token".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "data": form_data.to_dict(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth2TokenExchange]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth2TokenExchange.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth2TokenExchange]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: Oauth2TokenExchangeData,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth2TokenExchange]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries here
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth2TokenExchange]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: Oauth2TokenExchangeData,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth2TokenExchange]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries here
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth2TokenExchange]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: Oauth2TokenExchangeData,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth2TokenExchange]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries here
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth2TokenExchange]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: Oauth2TokenExchangeData,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth2TokenExchange]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     Use open source libraries to perform OAuth 2.0 and OpenID Connect
 | 
			
		||||
    available for any programming language. You can find a list of libraries here
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
 | 
			
		||||
    The Ory SDK is not yet able to this endpoint properly.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth2TokenExchange]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,246 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_patch import JsonPatch
 | 
			
		||||
from typing import cast, List
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: List['JsonPatch'],
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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 = []
 | 
			
		||||
    for componentsschemasjson_patch_document_item_data in json_body:
 | 
			
		||||
        componentsschemasjson_patch_document_item = componentsschemasjson_patch_document_item_data.to_dict()
 | 
			
		||||
 | 
			
		||||
        json_json_body.append(componentsschemasjson_patch_document_item)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "patch",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = cast(Any, None)
 | 
			
		||||
        return response_404
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: List['JsonPatch'],
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Patch OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`
 | 
			
		||||
    the secret will be updated and returned via the API. This is the
 | 
			
		||||
    only time you will be able to retrieve the client secret, so write it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (List['JsonPatch']): A JSONPatchDocument request
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: List['JsonPatch'],
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Patch OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`
 | 
			
		||||
    the secret will be updated and returned via the API. This is the
 | 
			
		||||
    only time you will be able to retrieve the client secret, so write it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (List['JsonPatch']): A JSONPatchDocument request
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: List['JsonPatch'],
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Patch OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`
 | 
			
		||||
    the secret will be updated and returned via the API. This is the
 | 
			
		||||
    only time you will be able to retrieve the client secret, so write it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (List['JsonPatch']): A JSONPatchDocument request
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: List['JsonPatch'],
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Patch OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`
 | 
			
		||||
    the secret will be updated and returned via the API. This is the
 | 
			
		||||
    only time you will be able to retrieve the client secret, so write it down and keep it safe.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (List['JsonPatch']): A JSONPatchDocument request
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,302 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.the_request_payload_used_to_accept_a_login_or_consent_request import TheRequestPayloadUsedToAcceptALoginOrConsentRequest
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources
 | 
			
		||||
    on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources
 | 
			
		||||
    on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources
 | 
			
		||||
    on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    consent_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Consent Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she
 | 
			
		||||
    must now be asked if
 | 
			
		||||
    the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the
 | 
			
		||||
    subject's behalf.
 | 
			
		||||
 | 
			
		||||
    The consent challenge is appended to the consent provider's URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The consent
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the
 | 
			
		||||
    subject accepted
 | 
			
		||||
    or rejected the request.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources
 | 
			
		||||
    on his/her behalf.
 | 
			
		||||
    The consent provider must include a reason why the consent was not granted.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the consent provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    The default consent provider is available via the Ory Managed Account Experience. To customize the
 | 
			
		||||
    consent provider, please
 | 
			
		||||
    head over to the OAuth 2.0 documentation.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        consent_challenge (str):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
consent_challenge=consent_challenge,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,26 +1,27 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.o_auth_20_redirect_browser_to import OAuth20RedirectBrowserTo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.the_request_payload_used_to_accept_a_login_or_consent_request import TheRequestPayloadUsedToAcceptALoginOrConsentRequest
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.reject_request import RejectRequest
 | 
			
		||||
from ...models.completed_request import CompletedRequest
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/auth/requests/login/reject".format(
 | 
			
		||||
    url = "{}/admin/oauth2/auth/requests/login/reject".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
| 
						 | 
				
			
			@ -55,83 +56,62 @@ def _get_kwargs(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = CompletedRequest.from_dict(response.json())
 | 
			
		||||
        response_200 = OAuth20RedirectBrowserTo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_404
 | 
			
		||||
    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[CompletedRequest, GenericError]]:
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Login Request
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    This endpoint tells Ory that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    authentication
 | 
			
		||||
    was be denied.
 | 
			
		||||
    was denied.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -147,42 +127,42 @@ login_challenge=login_challenge,
 | 
			
		|||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Login Request
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    This endpoint tells Ory that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    authentication
 | 
			
		||||
    was be denied.
 | 
			
		||||
    was denied.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -196,37 +176,37 @@ login_challenge=login_challenge,
 | 
			
		|||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Login Request
 | 
			
		||||
) -> Response[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    This endpoint tells Ory that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    authentication
 | 
			
		||||
    was be denied.
 | 
			
		||||
    was denied.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -242,42 +222,42 @@ login_challenge=login_challenge,
 | 
			
		|||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: RejectRequest,
 | 
			
		||||
    json_body: TheRequestPayloadUsedToAcceptALoginOrConsentRequest,
 | 
			
		||||
    login_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[CompletedRequest, GenericError]]:
 | 
			
		||||
    """Reject a Login Request
 | 
			
		||||
) -> Optional[OAuth20RedirectBrowserTo]:
 | 
			
		||||
    """Reject OAuth 2.0 Login Request
 | 
			
		||||
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the
 | 
			
		||||
    login provider
 | 
			
		||||
    (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now
 | 
			
		||||
    about it. The login
 | 
			
		||||
    provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a
 | 
			
		||||
    login screen\")
 | 
			
		||||
    a subject (in OAuth2 the proper name for subject is \"resource owner\").
 | 
			
		||||
     When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login
 | 
			
		||||
    provider
 | 
			
		||||
    to authenticate the subject and then tell the Ory OAuth2 Service about it.
 | 
			
		||||
 | 
			
		||||
    The authentication challenge is appended to the login provider URL to which the subject's user-agent
 | 
			
		||||
    (browser) is redirected to. The login
 | 
			
		||||
    provider uses that challenge to fetch information on the OAuth2 request and then accept or reject
 | 
			
		||||
    the requested authentication process.
 | 
			
		||||
 | 
			
		||||
    This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    This endpoint tells Ory that the subject has not authenticated and includes a reason why the
 | 
			
		||||
    authentication
 | 
			
		||||
    was be denied.
 | 
			
		||||
    was denied.
 | 
			
		||||
 | 
			
		||||
    The response contains a redirect URL which the login provider should redirect the user-agent to.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        login_challenge (str):
 | 
			
		||||
        json_body (RejectRequest):
 | 
			
		||||
        json_body (TheRequestPayloadUsedToAcceptALoginOrConsentRequest):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[CompletedRequest, GenericError]]
 | 
			
		||||
        Response[OAuth20RedirectBrowserTo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,148 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "put",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Reject OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to deny that logout request.
 | 
			
		||||
    No HTTP request body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    logout_challenge: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Reject OAuth 2.0 Session Logout Request
 | 
			
		||||
 | 
			
		||||
     When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this
 | 
			
		||||
    endpoint is used to deny that logout request.
 | 
			
		||||
    No HTTP request body is required.
 | 
			
		||||
 | 
			
		||||
    The response is empty as the logout provider has to chose what action to perform next.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        logout_challenge (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
logout_challenge=logout_challenge,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,167 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...types import UNSET, Unset
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from typing import Union
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
    client: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    all_: Union[Unset, None, bool] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
    client: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    all_: Union[Unset, None, bool] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revoke OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions and invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0
 | 
			
		||||
    Client ID.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
    client: Union[Unset, None, str] = UNSET,
 | 
			
		||||
    all_: Union[Unset, None, bool] = UNSET,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revoke OAuth 2.0 Consent Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint revokes a subject's granted consent sessions and invalidates all
 | 
			
		||||
    associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0
 | 
			
		||||
    Client ID.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
        client (Union[Unset, None, str]):
 | 
			
		||||
        all_ (Union[Unset, None, bool]):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
client=client,
 | 
			
		||||
all_=all_,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,146 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "params": params,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revokes All OAuth 2.0 Login Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and
 | 
			
		||||
    does not work with OpenID Connect Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    subject: str,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revokes All OAuth 2.0 Login Sessions of a Subject
 | 
			
		||||
 | 
			
		||||
     This endpoint invalidates a subject's authentication session. After revoking the authentication
 | 
			
		||||
    session, the subject
 | 
			
		||||
    has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and
 | 
			
		||||
    does not work with OpenID Connect Front- or Back-channel logout.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        subject (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
subject=subject,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,143 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.revoke_o_auth_2_token_data import RevokeOAuth2TokenData
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: RevokeOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/revoke".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "data": form_data.to_dict(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: RevokeOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revoke OAuth 2.0 Access or Refresh Token
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    form_data: RevokeOAuth2TokenData,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Revoke OAuth 2.0 Access or Refresh Token
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
form_data=form_data,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,260 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = cast(Any, None)
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = cast(Any, None)
 | 
			
		||||
        return response_404
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the
 | 
			
		||||
    secret is used,
 | 
			
		||||
    otherwise the existing secret is used.
 | 
			
		||||
 | 
			
		||||
    If set, the secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the
 | 
			
		||||
    secret is used,
 | 
			
		||||
    otherwise the existing secret is used.
 | 
			
		||||
 | 
			
		||||
    If set, the secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the
 | 
			
		||||
    secret is used,
 | 
			
		||||
    otherwise the existing secret is used.
 | 
			
		||||
 | 
			
		||||
    If set, the secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth 2.0 Client
 | 
			
		||||
 | 
			
		||||
     Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the
 | 
			
		||||
    secret is used,
 | 
			
		||||
    otherwise the existing secret is used.
 | 
			
		||||
 | 
			
		||||
    If set, the secret is echoed in the response. It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,219 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.o_auth_20_client_token_lifespans import OAuth20ClientTokenLifespans
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20ClientTokenLifespans,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/clients/{id}/lifespans".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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20Client]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20Client]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20ClientTokenLifespans,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Set OAuth2 Client Token Lifespans
 | 
			
		||||
 | 
			
		||||
     Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other
 | 
			
		||||
    fields.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20ClientTokenLifespans): Lifespans of different token types issued for
 | 
			
		||||
            this OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20ClientTokenLifespans,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Set OAuth2 Client Token Lifespans
 | 
			
		||||
 | 
			
		||||
     Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other
 | 
			
		||||
    fields.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20ClientTokenLifespans): Lifespans of different token types issued for
 | 
			
		||||
            this OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20ClientTokenLifespans,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Set OAuth2 Client Token Lifespans
 | 
			
		||||
 | 
			
		||||
     Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other
 | 
			
		||||
    fields.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20ClientTokenLifespans): Lifespans of different token types issued for
 | 
			
		||||
            this OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20ClientTokenLifespans,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Set OAuth2 Client Token Lifespans
 | 
			
		||||
 | 
			
		||||
     Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other
 | 
			
		||||
    fields.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20ClientTokenLifespans): Lifespans of different token types issued for
 | 
			
		||||
            this OAuth 2.0 Client.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,210 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.trusted_o_auth_2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.trust_o_auth_2_jwt_grant_issuer import TrustOAuth2JwtGrantIssuer
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TrustOAuth2JwtGrantIssuer,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/admin/trust/grants/jwt-bearer/issuers".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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    if response.status_code == HTTPStatus.CREATED:
 | 
			
		||||
        response_201 = TrustedOAuth2JwtGrantIssuer.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_201
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TrustOAuth2JwtGrantIssuer,
 | 
			
		||||
 | 
			
		||||
) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Trust OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to establish a trust relationship for a JWT issuer
 | 
			
		||||
    to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication
 | 
			
		||||
    and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (TrustOAuth2JwtGrantIssuer): Trust OAuth2 JWT Bearer Grant Type Issuer Request
 | 
			
		||||
            Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TrustOAuth2JwtGrantIssuer,
 | 
			
		||||
 | 
			
		||||
) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Trust OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to establish a trust relationship for a JWT issuer
 | 
			
		||||
    to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication
 | 
			
		||||
    and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (TrustOAuth2JwtGrantIssuer): Trust OAuth2 JWT Bearer Grant Type Issuer Request
 | 
			
		||||
            Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TrustOAuth2JwtGrantIssuer,
 | 
			
		||||
 | 
			
		||||
) -> Response[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Trust OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to establish a trust relationship for a JWT issuer
 | 
			
		||||
    to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication
 | 
			
		||||
    and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (TrustOAuth2JwtGrantIssuer): Trust OAuth2 JWT Bearer Grant Type Issuer Request
 | 
			
		||||
            Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: TrustOAuth2JwtGrantIssuer,
 | 
			
		||||
 | 
			
		||||
) -> Optional[TrustedOAuth2JwtGrantIssuer]:
 | 
			
		||||
    """Trust OAuth2 JWT Bearer Grant Type Issuer
 | 
			
		||||
 | 
			
		||||
     Use this endpoint to establish a trust relationship for a JWT issuer
 | 
			
		||||
    to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication
 | 
			
		||||
    and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (TrustOAuth2JwtGrantIssuer): Trust OAuth2 JWT Bearer Grant Type Issuer Request
 | 
			
		||||
            Body
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[TrustedOAuth2JwtGrantIssuer]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,272 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/register".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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.CREATED:
 | 
			
		||||
        response_201 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_201
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = cast(Any, None)
 | 
			
		||||
        return response_400
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Register OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    Please note that using this endpoint you are not able to choose the `client_secret` nor the
 | 
			
		||||
    `client_id` as those
 | 
			
		||||
    values will be server generated when specifying `token_endpoint_auth_method` as
 | 
			
		||||
    `client_secret_basic` or
 | 
			
		||||
    `client_secret_post`.
 | 
			
		||||
 | 
			
		||||
    The `client_secret` will be returned in the response and you will not be able to retrieve it later
 | 
			
		||||
    on.
 | 
			
		||||
    Write the secret down and keep it somewhere safe.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Register OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    Please note that using this endpoint you are not able to choose the `client_secret` nor the
 | 
			
		||||
    `client_id` as those
 | 
			
		||||
    values will be server generated when specifying `token_endpoint_auth_method` as
 | 
			
		||||
    `client_secret_basic` or
 | 
			
		||||
    `client_secret_post`.
 | 
			
		||||
 | 
			
		||||
    The `client_secret` will be returned in the response and you will not be able to retrieve it later
 | 
			
		||||
    on.
 | 
			
		||||
    Write the secret down and keep it somewhere safe.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Register OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    Please note that using this endpoint you are not able to choose the `client_secret` nor the
 | 
			
		||||
    `client_id` as those
 | 
			
		||||
    values will be server generated when specifying `token_endpoint_auth_method` as
 | 
			
		||||
    `client_secret_basic` or
 | 
			
		||||
    `client_secret_post`.
 | 
			
		||||
 | 
			
		||||
    The `client_secret` will be returned in the response and you will not be able to retrieve it later
 | 
			
		||||
    on.
 | 
			
		||||
    Write the secret down and keep it somewhere safe.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Register OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    Please note that using this endpoint you are not able to choose the `client_secret` nor the
 | 
			
		||||
    `client_id` as those
 | 
			
		||||
    values will be server generated when specifying `token_endpoint_auth_method` as
 | 
			
		||||
    `client_secret_basic` or
 | 
			
		||||
    `client_secret_post`.
 | 
			
		||||
 | 
			
		||||
    The `client_secret` will be returned in the response and you will not be able to retrieve it later
 | 
			
		||||
    on.
 | 
			
		||||
    Write the secret down and keep it somewhere safe.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,165 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/register/{id}".format(
 | 
			
		||||
        _client.base_url,id=id)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "delete",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.NO_CONTENT:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This
 | 
			
		||||
    endpoint
 | 
			
		||||
    is disabled by default. It can be enabled by an administrator.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,193 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.open_id_connect_discovery_metadata import OpenIDConnectDiscoveryMetadata
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OpenIDConnectDiscoveryMetadata.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and
 | 
			
		||||
    obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OpenIDConnectDiscoveryMetadata]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and
 | 
			
		||||
    obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OpenIDConnectDiscoveryMetadata]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and
 | 
			
		||||
    obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OpenIDConnectDiscoveryMetadata]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OpenIDConnectDiscoveryMetadata]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and
 | 
			
		||||
    obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OpenIDConnectDiscoveryMetadata]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,234 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/register/{id}".format(
 | 
			
		||||
        _client.base_url,id=id)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OAuth20Client]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OAuth20Client]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Get OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Get OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[OAuth20Client]:
 | 
			
		||||
    """Get OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OAuth20Client]:
 | 
			
		||||
    """Get OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly and can be used in self-service. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OAuth20Client]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,197 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from ...models.oidc_user_info import OidcUserInfo
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/userinfo".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[OidcUserInfo]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OidcUserInfo.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[OidcUserInfo]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[OidcUserInfo]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including `session.id_token` values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token's consent request.
 | 
			
		||||
 | 
			
		||||
    In the case of authentication error, a WWW-Authenticate header might be set in the response
 | 
			
		||||
    with more information about the error. See [the
 | 
			
		||||
    spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)
 | 
			
		||||
    for more details about header format.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OidcUserInfo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OidcUserInfo]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including `session.id_token` values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token's consent request.
 | 
			
		||||
 | 
			
		||||
    In the case of authentication error, a WWW-Authenticate header might be set in the response
 | 
			
		||||
    with more information about the error. See [the
 | 
			
		||||
    spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)
 | 
			
		||||
    for more details about header format.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OidcUserInfo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[OidcUserInfo]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including `session.id_token` values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token's consent request.
 | 
			
		||||
 | 
			
		||||
    In the case of authentication error, a WWW-Authenticate header might be set in the response
 | 
			
		||||
    with more information about the error. See [the
 | 
			
		||||
    spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)
 | 
			
		||||
    for more details about header format.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OidcUserInfo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[OidcUserInfo]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including `session.id_token` values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token's consent request.
 | 
			
		||||
 | 
			
		||||
    In the case of authentication error, a WWW-Authenticate header might be set in the response
 | 
			
		||||
    with more information about the error. See [the
 | 
			
		||||
    spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)
 | 
			
		||||
    for more details about header format.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[OidcUserInfo]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,134 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
 | 
			
		||||
    if response.status_code == HTTPStatus.FOUND:
 | 
			
		||||
        return None
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OpenID Connect Front- and Back-channel Enabled Logout
 | 
			
		||||
 | 
			
		||||
     This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates
 | 
			
		||||
    OpenID Connect Front- / Back-channel logout:
 | 
			
		||||
 | 
			
		||||
    https://openid.net/specs/openid-connect-frontchannel-1_0.html
 | 
			
		||||
    https://openid.net/specs/openid-connect-backchannel-1_0.html
 | 
			
		||||
 | 
			
		||||
    Back-channel logout is performed asynchronously and does not affect logout flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OpenID Connect Front- and Back-channel Enabled Logout
 | 
			
		||||
 | 
			
		||||
     This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates
 | 
			
		||||
    OpenID Connect Front- / Back-channel logout:
 | 
			
		||||
 | 
			
		||||
    https://openid.net/specs/openid-connect-frontchannel-1_0.html
 | 
			
		||||
    https://openid.net/specs/openid-connect-backchannel-1_0.html
 | 
			
		||||
 | 
			
		||||
    Back-channel logout is performed asynchronously and does not affect logout flow.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,305 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from typing import cast
 | 
			
		||||
from ...models.o_auth_20_client import OAuth20Client
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/register/{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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
        "json": json_json_body,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = OAuth20Client.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.NOT_FOUND:
 | 
			
		||||
        response_404 = cast(Any, None)
 | 
			
		||||
        return response_404
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly to be used by third parties. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    This feature is disabled per default. It can be enabled by a system administrator.
 | 
			
		||||
 | 
			
		||||
    If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the
 | 
			
		||||
    secret is echoed in the response.
 | 
			
		||||
    It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly to be used by third parties. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    This feature is disabled per default. It can be enabled by a system administrator.
 | 
			
		||||
 | 
			
		||||
    If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the
 | 
			
		||||
    secret is echoed in the response.
 | 
			
		||||
    It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly to be used by third parties. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    This feature is disabled per default. It can be enabled by a system administrator.
 | 
			
		||||
 | 
			
		||||
    If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the
 | 
			
		||||
    secret is echoed in the response.
 | 
			
		||||
    It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    id: str,
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
    json_body: OAuth20Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, OAuth20Client]]:
 | 
			
		||||
    """Set OAuth2 Client using OpenID Dynamic Client Registration
 | 
			
		||||
 | 
			
		||||
     This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of
 | 
			
		||||
    facing the
 | 
			
		||||
    public internet directly to be used by third parties. It implements the OpenID Connect
 | 
			
		||||
    Dynamic Client Registration Protocol.
 | 
			
		||||
 | 
			
		||||
    This feature is disabled per default. It can be enabled by a system administrator.
 | 
			
		||||
 | 
			
		||||
    If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the
 | 
			
		||||
    secret is echoed in the response.
 | 
			
		||||
    It is not possible to retrieve it later on.
 | 
			
		||||
 | 
			
		||||
    To use this endpoint, you will need to present the client's authentication credentials. If the
 | 
			
		||||
    OAuth2 Client
 | 
			
		||||
    uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client
 | 
			
		||||
    secret in the URL query.
 | 
			
		||||
    If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization
 | 
			
		||||
    header.
 | 
			
		||||
 | 
			
		||||
    OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients
 | 
			
		||||
    are
 | 
			
		||||
    generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        id (str):
 | 
			
		||||
        json_body (OAuth20Client): OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID
 | 
			
		||||
            Connect flows. Usually, OAuth 2.0 clients are
 | 
			
		||||
            generated for applications which want to consume your OAuth 2.0 or OpenID Connect
 | 
			
		||||
            capabilities.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, OAuth20Client]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        id=id,
 | 
			
		||||
_client=_client,
 | 
			
		||||
json_body=json_body,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,113 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=None,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OpenID Connect Front-Backchannel Enabled Logout
 | 
			
		||||
 | 
			
		||||
     This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect
 | 
			
		||||
    Front-/Back-channel logout:
 | 
			
		||||
 | 
			
		||||
    https://openid.net/specs/openid-connect-frontchannel-1_0.html
 | 
			
		||||
    https://openid.net/specs/openid-connect-backchannel-1_0.html
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Any]:
 | 
			
		||||
    """OpenID Connect Front-Backchannel Enabled Logout
 | 
			
		||||
 | 
			
		||||
     This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect
 | 
			
		||||
    Front-/Back-channel logout:
 | 
			
		||||
 | 
			
		||||
    https://openid.net/specs/openid-connect-frontchannel-1_0.html
 | 
			
		||||
    https://openid.net/specs/openid-connect-backchannel-1_0.html
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Any]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,197 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, WellKnown]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = WellKnown.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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, WellKnown]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, WellKnown]]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage
 | 
			
		||||
    you to not roll
 | 
			
		||||
    your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn
 | 
			
		||||
    more on this
 | 
			
		||||
    flow at https://openid.net/specs/openid-connect-discovery-1_0.html .
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, WellKnown]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, WellKnown]]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage
 | 
			
		||||
    you to not roll
 | 
			
		||||
    your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn
 | 
			
		||||
    more on this
 | 
			
		||||
    flow at https://openid.net/specs/openid-connect-discovery-1_0.html .
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, WellKnown]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, WellKnown]]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage
 | 
			
		||||
    you to not roll
 | 
			
		||||
    your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn
 | 
			
		||||
    more on this
 | 
			
		||||
    flow at https://openid.net/specs/openid-connect-discovery-1_0.html .
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, WellKnown]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, WellKnown]]:
 | 
			
		||||
    """OpenID Connect Discovery
 | 
			
		||||
 | 
			
		||||
     The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage
 | 
			
		||||
    you to not roll
 | 
			
		||||
    your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn
 | 
			
		||||
    more on this
 | 
			
		||||
    flow at https://openid.net/specs/openid-connect-discovery-1_0.html .
 | 
			
		||||
 | 
			
		||||
    Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang),
 | 
			
		||||
    and others.
 | 
			
		||||
    For a full list of clients go here: https://openid.net/developers/certified/
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, WellKnown]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,208 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.oauth_2_token_response import Oauth2TokenResponse
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = Oauth2TokenResponse.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.BAD_REQUEST:
 | 
			
		||||
        response_400 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_400
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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, Oauth2TokenResponse]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, Oauth2TokenResponse]]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     The client makes a request to the token endpoint by sending the
 | 
			
		||||
    following parameters using the \"application/x-www-form-urlencoded\" HTTP
 | 
			
		||||
    request entity-body.
 | 
			
		||||
 | 
			
		||||
    > Do not implement a client for this endpoint yourself. Use a library. There are many libraries
 | 
			
		||||
    > available for any programming language. You can find a list of libraries here:
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
    >
 | 
			
		||||
    > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed
 | 
			
		||||
    above!
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, Oauth2TokenResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, Oauth2TokenResponse]]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     The client makes a request to the token endpoint by sending the
 | 
			
		||||
    following parameters using the \"application/x-www-form-urlencoded\" HTTP
 | 
			
		||||
    request entity-body.
 | 
			
		||||
 | 
			
		||||
    > Do not implement a client for this endpoint yourself. Use a library. There are many libraries
 | 
			
		||||
    > available for any programming language. You can find a list of libraries here:
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
    >
 | 
			
		||||
    > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed
 | 
			
		||||
    above!
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, Oauth2TokenResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, Oauth2TokenResponse]]:
 | 
			
		||||
    """The OAuth 2.0 Token Endpoint
 | 
			
		||||
 | 
			
		||||
     The client makes a request to the token endpoint by sending the
 | 
			
		||||
    following parameters using the \"application/x-www-form-urlencoded\" HTTP
 | 
			
		||||
    request entity-body.
 | 
			
		||||
 | 
			
		||||
    > Do not implement a client for this endpoint yourself. Use a library. There are many libraries
 | 
			
		||||
    > available for any programming language. You can find a list of libraries here:
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
    >
 | 
			
		||||
    > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed
 | 
			
		||||
    above!
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, Oauth2TokenResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     The client makes a request to the token endpoint by sending the
 | 
			
		||||
    following parameters using the \"application/x-www-form-urlencoded\" HTTP
 | 
			
		||||
    request entity-body.
 | 
			
		||||
 | 
			
		||||
    > Do not implement a client for this endpoint yourself. Use a library. There are many libraries
 | 
			
		||||
    > available for any programming language. You can find a list of libraries here:
 | 
			
		||||
    https://oauth.net/code/
 | 
			
		||||
    >
 | 
			
		||||
    > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed
 | 
			
		||||
    above!
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, Oauth2TokenResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,177 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/oauth2/auth".format(
 | 
			
		||||
        _client.base_url)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.FOUND:
 | 
			
		||||
        response_302 = cast(Any, None)
 | 
			
		||||
        return response_302
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """The OAuth 2.0 Authorize Endpoint
 | 
			
		||||
 | 
			
		||||
     This endpoint is not documented here because you should never use your own implementation to perform
 | 
			
		||||
    OAuth2 flows.
 | 
			
		||||
    OAuth2 is a very popular protocol and a library for your programming language will exists.
 | 
			
		||||
 | 
			
		||||
    To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """The OAuth 2.0 Authorize Endpoint
 | 
			
		||||
 | 
			
		||||
     This endpoint is not documented here because you should never use your own implementation to perform
 | 
			
		||||
    OAuth2 flows.
 | 
			
		||||
    OAuth2 is a very popular protocol and a library for your programming language will exists.
 | 
			
		||||
 | 
			
		||||
    To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """The OAuth 2.0 Authorize Endpoint
 | 
			
		||||
 | 
			
		||||
     This endpoint is not documented here because you should never use your own implementation to perform
 | 
			
		||||
    OAuth2 flows.
 | 
			
		||||
    OAuth2 is a very popular protocol and a library for your programming language will exists.
 | 
			
		||||
 | 
			
		||||
    To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
     This endpoint is not documented here because you should never use your own implementation to perform
 | 
			
		||||
    OAuth2 flows.
 | 
			
		||||
    OAuth2 is a very popular protocol and a library for your programming language will exists.
 | 
			
		||||
 | 
			
		||||
    To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,186 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.generic_error import GenericError
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "post",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = cast(Any, None)
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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[Any, GenericError]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Revoke OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Revoke OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[Any, GenericError]]:
 | 
			
		||||
    """Revoke OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[Any, GenericError]]:
 | 
			
		||||
    """Revoke OAuth2 Tokens
 | 
			
		||||
 | 
			
		||||
     Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access
 | 
			
		||||
    token can no
 | 
			
		||||
    longer be used to make access requests, and a revoked refresh token can no longer be used to refresh
 | 
			
		||||
    an access token.
 | 
			
		||||
    Revoking a refresh token also invalidates the access token that was created with it. A token may
 | 
			
		||||
    only be revoked by
 | 
			
		||||
    the client the token was generated for.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[Any, GenericError]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,181 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
 | 
			
		||||
from ...models.userinfo_response import UserinfoResponse
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
    headers: Dict[str, str] = _client.get_headers()
 | 
			
		||||
    cookies: Dict[str, Any] = _client.get_cookies()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
	    "method": "get",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, UserinfoResponse]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = UserinfoResponse.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if response.status_code == HTTPStatus.UNAUTHORIZED:
 | 
			
		||||
        response_401 = GenericError.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_401
 | 
			
		||||
    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, UserinfoResponse]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, UserinfoResponse]]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including the idTokenExtra values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token.
 | 
			
		||||
 | 
			
		||||
    For more information please [refer to the spec](http://openid.net/specs/openid-connect-
 | 
			
		||||
    core-1_0.html#UserInfo).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, UserinfoResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, UserinfoResponse]]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including the idTokenExtra values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token.
 | 
			
		||||
 | 
			
		||||
    For more information please [refer to the spec](http://openid.net/specs/openid-connect-
 | 
			
		||||
    core-1_0.html#UserInfo).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, UserinfoResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, UserinfoResponse]]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including the idTokenExtra values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token.
 | 
			
		||||
 | 
			
		||||
    For more information please [refer to the spec](http://openid.net/specs/openid-connect-
 | 
			
		||||
    core-1_0.html#UserInfo).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, UserinfoResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: AuthenticatedClient,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, UserinfoResponse]]:
 | 
			
		||||
    """OpenID Connect Userinfo
 | 
			
		||||
 | 
			
		||||
     This endpoint returns the payload of the ID Token, including the idTokenExtra values, of
 | 
			
		||||
    the provided OAuth 2.0 Access Token.
 | 
			
		||||
 | 
			
		||||
    For more information please [refer to the spec](http://openid.net/specs/openid-connect-
 | 
			
		||||
    core-1_0.html#UserInfo).
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, UserinfoResponse]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,171 +0,0 @@
 | 
			
		|||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
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 typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JSONWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    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, JSONWebKeySet]]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=response.status_code,
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """JSON Web Keys Discovery
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens
 | 
			
		||||
    and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """JSON Web Keys Discovery
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens
 | 
			
		||||
    and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """JSON Web Keys Discovery
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens
 | 
			
		||||
    and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[Union[GenericError, JSONWebKeySet]]:
 | 
			
		||||
    """JSON Web Keys Discovery
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens
 | 
			
		||||
    and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[Union[GenericError, JSONWebKeySet]]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,181 @@
 | 
			
		|||
from http import HTTPStatus
 | 
			
		||||
from typing import Any, Dict, List, Optional, Union, cast
 | 
			
		||||
 | 
			
		||||
import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import AuthenticatedClient, Client
 | 
			
		||||
from ...types import Response, UNSET
 | 
			
		||||
from ... import errors
 | 
			
		||||
 | 
			
		||||
from typing import cast
 | 
			
		||||
from typing import Dict
 | 
			
		||||
from ...models.json_web_key_set import JsonWebKeySet
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    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",
 | 
			
		||||
        "url": url,
 | 
			
		||||
        "headers": headers,
 | 
			
		||||
        "cookies": cookies,
 | 
			
		||||
        "timeout": _client.get_timeout(),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    if response.status_code == HTTPStatus.OK:
 | 
			
		||||
        response_200 = JsonWebKeySet.from_dict(response.json())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return response_200
 | 
			
		||||
    if client.raise_on_unexpected_status:
 | 
			
		||||
        raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
 | 
			
		||||
    else:
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _build_response(*, client: Client, response: httpx.Response) -> Response[JsonWebKeySet]:
 | 
			
		||||
    return Response(
 | 
			
		||||
        status_code=HTTPStatus(response.status_code),
 | 
			
		||||
        content=response.content,
 | 
			
		||||
        headers=response.headers,
 | 
			
		||||
        parsed=_parse_response(client=client, response=response),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Discover Well-Known JSON Web Keys
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    response = httpx.request(
 | 
			
		||||
        verify=_client.verify_ssl,
 | 
			
		||||
        **kwargs,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Discover Well-Known JSON Web Keys
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Response[JsonWebKeySet]:
 | 
			
		||||
    """Discover Well-Known JSON Web Keys
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    async with httpx.AsyncClient(verify=_client.verify_ssl) as __client:
 | 
			
		||||
        response = await __client.request(
 | 
			
		||||
            **kwargs
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    return _build_response(client=_client, response=response)
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    *,
 | 
			
		||||
    _client: Client,
 | 
			
		||||
 | 
			
		||||
) -> Optional[JsonWebKeySet]:
 | 
			
		||||
    """Discover Well-Known JSON Web Keys
 | 
			
		||||
 | 
			
		||||
     This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,
 | 
			
		||||
    if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like
 | 
			
		||||
    [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
 | 
			
		||||
 | 
			
		||||
    Raises:
 | 
			
		||||
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
 | 
			
		||||
        httpx.TimeoutException: If the request takes longer than Client.timeout.
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        Response[JsonWebKeySet]
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    return (await asyncio_detailed(
 | 
			
		||||
        _client=_client,
 | 
			
		||||
 | 
			
		||||
    )).parsed
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue