You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is my attempt to execute an user authentication from API:
`import json
import authentik_client
from authentik_client.rest import ApiException
from authentik_client.exceptions import NotFoundException
import authentik_client.api.flows_api
configuration = authentik_client.Configuration(
host = "http://localhost/api/v3",
username = "u2", # is the user to log in??
access_token = "" # g_access_token
)
with authentik_client.ApiClient(configuration) as api_client:
slug = "default-authentication-flow"
# slug = "default-source-authentication"
# slug = "test-flow"
d=None
dd = json.dumps(d)
try:
flow_api = authentik_client.api.flows_api.FlowsApi(api_client)
response = flow_api.flows_executor_get(slug, query=dd)
print(f"GET response: {response.text}, {response.status_code } slug = {slug}")
print(f"GET response: {response}")
except NotFoundException as e:
print(f" http status {e.status}, http reason {e.reason}, body {e.body}, data {e.data}")
raise e
except ApiException as e:
print("Eccezione when calling flow_api.flows_executor_get: %s\n" % e)
raise e
`
but it doesn't work as there are too many possible challenge:
File "authentik-nginx/import_user/env/lib/python3.12/site-packages/authentik_client/models/challenge_types.py", line 438, in from_json
raise ValueError("Multiple matches found when deserializing the JSON string into ChallengeTypes with oneOf schema
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
this is my attempt to execute an user authentication from API:
`import json
import authentik_client
from authentik_client.rest import ApiException
from authentik_client.exceptions import NotFoundException
import authentik_client.api.flows_api
configuration = authentik_client.Configuration(
host = "http://localhost/api/v3",
username = "u2", # is the user to log in??
access_token = "" # g_access_token
)
with authentik_client.ApiClient(configuration) as api_client:
`
but it doesn't work as there are too many possible challenge:
File "authentik-nginx/import_user/env/lib/python3.12/site-packages/authentik_client/models/challenge_types.py", line 438, in from_json
raise ValueError("Multiple matches found when deserializing the JSON string into ChallengeTypes with oneOf schema
somebody has a hint? thanks
Beta Was this translation helpful? Give feedback.
All reactions