Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hybrid flow enable config to the fapi testsuite #20644

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
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