Skip to content

Commit

Permalink
toggle 2factor auth setting
Browse files Browse the repository at this point in the history
  • Loading branch information
hilpitome committed Dec 5, 2024
1 parent 28402f0 commit 37f352c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion importer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ def main(
data = json.loads(keyclock_browser_flows_response[0])

result = next((item for item in data if item["displayName"] == target_display_name), None)
result["requirement"] = "REQUIRED"
if(result["requirement"]== "ALTERNATIVE"):
result["requirement"] = "REQUIRED"
else:
result["requirement"] = "ALTERNATIVE"
parsed_payload = json.dumps(result)
update_keycloak_browser_flow_response = handle_request(
"PUT",payload = parsed_payload, url = keycloak_url+"/admin/realms/master/authentication/flows/browser/executions"
Expand Down

0 comments on commit 37f352c

Please sign in to comment.