Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
baszoetekouw committed Jun 8, 2022
1 parent 9726bd7 commit db16a6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions server/api/mfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def _do_get2fa(schac_home_organisation, user_identifier):
img.save(buffered, format="PNG")
img_str = base64.b64encode(buffered.getvalue()).decode()
idp_name = idp_display_name(schac_home_organisation, "en")
# hier ook ssid_required en sha en uid teruggeven
return {"qr_code_base64": img_str, "secret": secret, "idp_name": idp_name}, 200


Expand Down Expand Up @@ -144,7 +143,6 @@ def get2fa_proxy_authz():
user = User.query.filter(User.second_fa_uuid == second_fa_uuid).one()
if user.second_factor_auth:
return {}, 200
# hier ook ssid_required teruggeven
return _do_get2fa(user.schac_home_organisation, user.uid)


Expand Down
3 changes: 2 additions & 1 deletion server/api/user_saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def _perform_sram_login(uid, home_organisation_uid, schac_home_organisation, iss

# this is a configuration conflict and should never happen!
if idp_allowed and ssid_required:
raise Exception(f"Both IdP-based MFA and SSID-based MFA configured for IdP '{schac_home_organisation}'")
raise InternalServerError("Both IdP-based MFA and SSID-based MFA configured "
f"for IdP '{schac_home_organisation}'")

# if IdP-base MFA is set, we assume everything is handled by the IdP, and we skip all checks here
# also skip if user has already recently performed MFA
Expand Down

0 comments on commit db16a6d

Please sign in to comment.