All URIs are relative to https://demo.ziti.dev/edge/client/v1
Method | HTTP request | Description |
---|---|---|
authenticate | POST /authenticate | Authenticate via a method supplied via a query string parameter |
authenticate_mfa | POST /authenticate/mfa | Complete MFA authentication |
CurrentApiSessionDetailEnvelope authenticate(method)
Authenticate via a method supplied via a query string parameter
Allowed authentication methods include "password", "cert", and "ext-jwt"
import time
import openziti_edge_client
from openziti_edge_client.api import authentication_api
from openziti_edge_client.model.current_api_session_detail_envelope import CurrentApiSessionDetailEnvelope
from openziti_edge_client.model.authenticate import Authenticate
from openziti_edge_client.model.api_error_envelope import ApiErrorEnvelope
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/client/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_client.Configuration(
host = "https://demo.ziti.dev/edge/client/v1"
)
# Enter a context with an instance of the API client
with openziti_edge_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = authentication_api.AuthenticationApi(api_client)
method = "password" # str |
auth = Authenticate(
config_types=ConfigTypes([
"config_types_example",
]),
env_info=EnvInfo(
arch="arch_example",
os="os_example",
os_release="os_release_example",
os_version="os_version_example",
),
password=Password("password_example"),
sdk_info=SdkInfo(
app_id="app_id_example",
app_version="app_version_example",
branch="branch_example",
revision="revision_example",
type="type_example",
version="version_example",
),
username=Username("username_example"),
) # Authenticate | (optional)
# example passing only required values which don't have defaults set
try:
# Authenticate via a method supplied via a query string parameter
api_response = api_instance.authenticate(method)
pprint(api_response)
except openziti_edge_client.ApiException as e:
print("Exception when calling AuthenticationApi->authenticate: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Authenticate via a method supplied via a query string parameter
api_response = api_instance.authenticate(method, auth=auth)
pprint(api_response)
except openziti_edge_client.ApiException as e:
print("Exception when calling AuthenticationApi->authenticate: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
method | str | ||
auth | Authenticate | [optional] |
CurrentApiSessionDetailEnvelope
No authorization required
- Content-Type: application/json
- Accept: application/json, default
Status code | Description | Response headers |
---|---|---|
200 | The API session associated with the session used to issue the request | - |
400 | The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information | - |
401 | The authentication request could not be processed as the credentials are invalid | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Empty authenticate_mfa(mfa_auth)
Complete MFA authentication
Completes MFA authentication by submitting a MFA time based one time token or backup code.
- Api Key Authentication (ztSession):
- OAuth Authentication (oauth2):
import time
import openziti_edge_client
from openziti_edge_client.api import authentication_api
from openziti_edge_client.model.mfa_code import MfaCode
from openziti_edge_client.model.empty import Empty
from pprint import pprint
# Defining the host is optional and defaults to https://demo.ziti.dev/edge/client/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openziti_edge_client.Configuration(
host = "https://demo.ziti.dev/edge/client/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ztSession
configuration.api_key['ztSession'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ztSession'] = 'Bearer'
# Configure OAuth2 access token for authorization: oauth2
configuration = openziti_edge_client.Configuration(
host = "https://demo.ziti.dev/edge/client/v1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with openziti_edge_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = authentication_api.AuthenticationApi(api_client)
mfa_auth = MfaCode(
code="code_example",
) # MfaCode | An MFA validation request
# example passing only required values which don't have defaults set
try:
# Complete MFA authentication
api_response = api_instance.authenticate_mfa(mfa_auth)
pprint(api_response)
except openziti_edge_client.ApiException as e:
print("Exception when calling AuthenticationApi->authenticate_mfa: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
mfa_auth | MfaCode | An MFA validation request |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Base empty response | - |
401 | Base empty response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]