Skip to content

Commit

Permalink
Merge pull request #20685 from asha15/fapi
Browse files Browse the repository at this point in the history
Add hybrid flow enable config to the fapi testsuite
  • Loading branch information
asha15 authored Jul 14, 2024
2 parents aba51e8 + 28ed57e commit 5f7d6e0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions oidc-fapi-conformance-tests/configure_is_fapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,26 @@ def set_application_scopes_for_consent(application_id):
else:
print(">>> Application scope claims set successfully.")

#set hybrid flow response type for the application
def set_hybridFlow_config(application_id):
print(">>> Setting hybrid flow configuration.")
try:
app_details = get_service_provider_details(application_id)
app_details['hybridFlow'] = constants.ENABLE_HYBRID_FLOW
body = json.dumps(app_details)
response = requests.put(url=constants.APPLICATION_ENDPOINT + "/" + application_id + "/inbound-protocols/oidc",
headers=constants.HEADERS_WITH_AUTH, data=body, verify=False)
response.raise_for_status()
except HTTPError as http_error:
print(http_error)
print(response.text)
exit(1)
except Exception as error:
print("\nError occurred: " + str(error))
exit(1)
else:
print(">>> Hybrid flow configuration added successfully.")

# Skip login consent is true by default, here we disable it to go consent flows
def disable_skipping_consent(application_id):
print(">>> Setting Skip Login consent to false.")
Expand Down Expand Up @@ -275,6 +295,7 @@ def createSPApp(app_json):
app_details = get_service_provider_details(app_id)
set_application_scopes_for_consent(app_id)
disable_skipping_consent(app_id)
set_hybridFlow_config(app_id)
configure_acr(app_id)
return app_details

Expand Down
4 changes: 4 additions & 0 deletions oidc-fapi-conformance-tests/constants_fapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
"require_pushed_authorization_requests" : "true",
}

ENABLE_HYBRID_FLOW = {
"enable": "true",
"responseType": "code id_token"
}

SMTP_SERVER = "smtp.gmail.com"

Expand Down

0 comments on commit 5f7d6e0

Please sign in to comment.