-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
118f2c4
commit 4cea10c
Showing
27 changed files
with
809 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
component_registry_bindings/bindings/python_client/api/authentication_status/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .authentication_status_retrieve import * |
85 changes: 85 additions & 0 deletions
85
...ndings/bindings/python_client/api/authentication_status/authentication_status_retrieve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import requests | ||
|
||
from ...client import Client | ||
from ...models.authentication_status_retrieve_response_200 import ( | ||
AuthenticationStatusRetrieveResponse200, | ||
) | ||
from ...types import UNSET, Response, Unset | ||
|
||
QUERY_PARAMS = {} | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: Client, | ||
) -> Dict[str, Any]: | ||
url = "{}/api/authentication_status".format( | ||
client.base_url, | ||
) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, response: requests.Response | ||
) -> Optional[AuthenticationStatusRetrieveResponse200]: | ||
if response.status_code == 200: | ||
_response_200 = response.json() | ||
response_200: AuthenticationStatusRetrieveResponse200 | ||
if isinstance(_response_200, Unset): | ||
response_200 = UNSET | ||
else: | ||
response_200 = AuthenticationStatusRetrieveResponse200.from_dict( | ||
_response_200 | ||
) | ||
|
||
return response_200 | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, response: requests.Response | ||
) -> Response[AuthenticationStatusRetrieveResponse200]: | ||
return Response( | ||
status_code=response.status_code, | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
*, | ||
client: Client, | ||
) -> Response[AuthenticationStatusRetrieveResponse200]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
response = requests.get( | ||
verify=client.verify_ssl, | ||
auth=client.auth, | ||
timeout=client.timeout, | ||
**kwargs, | ||
) | ||
response.raise_for_status() | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: Client, | ||
) -> Optional[AuthenticationStatusRetrieveResponse200]: | ||
"""View to determine whether you are currently authenticated and, if so, as whom.""" | ||
|
||
return sync_detailed( | ||
client=client, | ||
).parsed |
1 change: 1 addition & 0 deletions
1
component_registry_bindings/bindings/python_client/api/controlled_access_test/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .controlled_access_test_retrieve import * |
86 changes: 86 additions & 0 deletions
86
...ings/bindings/python_client/api/controlled_access_test/controlled_access_test_retrieve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import requests | ||
|
||
from ...client import Client | ||
from ...models.controlled_access_test_retrieve_response_200 import ( | ||
ControlledAccessTestRetrieveResponse200, | ||
) | ||
from ...types import UNSET, Response, Unset | ||
|
||
QUERY_PARAMS = {} | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: Client, | ||
) -> Dict[str, Any]: | ||
url = "{}/api/controlled_access_test".format( | ||
client.base_url, | ||
) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, response: requests.Response | ||
) -> Optional[ControlledAccessTestRetrieveResponse200]: | ||
if response.status_code == 200: | ||
_response_200 = response.json() | ||
response_200: ControlledAccessTestRetrieveResponse200 | ||
if isinstance(_response_200, Unset): | ||
response_200 = UNSET | ||
else: | ||
response_200 = ControlledAccessTestRetrieveResponse200.from_dict( | ||
_response_200 | ||
) | ||
|
||
return response_200 | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, response: requests.Response | ||
) -> Response[ControlledAccessTestRetrieveResponse200]: | ||
return Response( | ||
status_code=response.status_code, | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
*, | ||
client: Client, | ||
) -> Response[ControlledAccessTestRetrieveResponse200]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
response = requests.get( | ||
verify=client.verify_ssl, | ||
auth=client.auth, | ||
timeout=client.timeout, | ||
**kwargs, | ||
) | ||
response.raise_for_status() | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: Client, | ||
) -> Optional[ControlledAccessTestRetrieveResponse200]: | ||
"""View to determine whether you are authenticated with an account that has a specific | ||
role.""" | ||
|
||
return sync_detailed( | ||
client=client, | ||
).parsed |
2 changes: 2 additions & 0 deletions
2
component_registry_bindings/bindings/python_client/api/token_auth_test/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .token_auth_test_create import * | ||
from .token_auth_test_retrieve import * |
85 changes: 85 additions & 0 deletions
85
...nt_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_create.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
from typing import Any, Dict, Optional, Union | ||
|
||
import requests | ||
|
||
from ...client import AuthenticatedClient | ||
from ...models.token_auth_test_create_response_200 import TokenAuthTestCreateResponse200 | ||
from ...types import UNSET, Response, Unset | ||
|
||
QUERY_PARAMS = {} | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Dict[str, Any]: | ||
url = "{}/api/token_auth_test".format( | ||
client.base_url, | ||
) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, response: requests.Response | ||
) -> Optional[Union[Any, TokenAuthTestCreateResponse200]]: | ||
if response.status_code == 200: | ||
_response_200 = response.json() | ||
response_200: TokenAuthTestCreateResponse200 | ||
if isinstance(_response_200, Unset): | ||
response_200 = UNSET | ||
else: | ||
response_200 = TokenAuthTestCreateResponse200.from_dict(_response_200) | ||
|
||
return response_200 | ||
if response.status_code == 401: | ||
response_401 = None | ||
|
||
return response_401 | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, response: requests.Response | ||
) -> Response[Union[Any, TokenAuthTestCreateResponse200]]: | ||
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, TokenAuthTestCreateResponse200]]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
response = requests.post( | ||
verify=client.verify_ssl, | ||
auth=client.auth, | ||
timeout=client.timeout, | ||
**kwargs, | ||
) | ||
response.raise_for_status() | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Optional[Union[Any, TokenAuthTestCreateResponse200]]: | ||
"""View to test authentication with DRF Tokens.""" | ||
|
||
return sync_detailed( | ||
client=client, | ||
).parsed |
83 changes: 83 additions & 0 deletions
83
..._registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_retrieve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
from typing import Any, Dict, Optional | ||
|
||
import requests | ||
|
||
from ...client import AuthenticatedClient | ||
from ...models.token_auth_test_retrieve_response_200 import ( | ||
TokenAuthTestRetrieveResponse200, | ||
) | ||
from ...types import UNSET, Response, Unset | ||
|
||
QUERY_PARAMS = {} | ||
|
||
|
||
def _get_kwargs( | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Dict[str, Any]: | ||
url = "{}/api/token_auth_test".format( | ||
client.base_url, | ||
) | ||
|
||
headers: Dict[str, Any] = client.get_headers() | ||
|
||
return { | ||
"url": url, | ||
"headers": headers, | ||
} | ||
|
||
|
||
def _parse_response( | ||
*, response: requests.Response | ||
) -> Optional[TokenAuthTestRetrieveResponse200]: | ||
if response.status_code == 200: | ||
_response_200 = response.json() | ||
response_200: TokenAuthTestRetrieveResponse200 | ||
if isinstance(_response_200, Unset): | ||
response_200 = UNSET | ||
else: | ||
response_200 = TokenAuthTestRetrieveResponse200.from_dict(_response_200) | ||
|
||
return response_200 | ||
return None | ||
|
||
|
||
def _build_response( | ||
*, response: requests.Response | ||
) -> Response[TokenAuthTestRetrieveResponse200]: | ||
return Response( | ||
status_code=response.status_code, | ||
content=response.content, | ||
headers=response.headers, | ||
parsed=_parse_response(response=response), | ||
) | ||
|
||
|
||
def sync_detailed( | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Response[TokenAuthTestRetrieveResponse200]: | ||
kwargs = _get_kwargs( | ||
client=client, | ||
) | ||
|
||
response = requests.get( | ||
verify=client.verify_ssl, | ||
auth=client.auth, | ||
timeout=client.timeout, | ||
**kwargs, | ||
) | ||
response.raise_for_status() | ||
|
||
return _build_response(response=response) | ||
|
||
|
||
def sync( | ||
*, | ||
client: AuthenticatedClient, | ||
) -> Optional[TokenAuthTestRetrieveResponse200]: | ||
"""View to test authentication with DRF Tokens.""" | ||
|
||
return sync_detailed( | ||
client=client, | ||
).parsed |
Oops, something went wrong.