Skip to content
Snippets Groups Projects
Commit 78151e92 authored by Pavel Břoušek's avatar Pavel Břoušek
Browse files

chore: merge branch 'mfa_proxy_forced' into 'main'

feat: force MFA based on proxyMFAEnforced state attribute

Closes PRX-312

See merge request perun-proxy-aai/simplesamlphp/simplesamlphp-module-authswitcher!57
parents b42fdd24 68db385c
No related branches found
No related tags found
1 merge request!57feat: force MFA based on proxyMFAEnforced state attribute
Pipeline #331464 passed with warnings
...@@ -57,6 +57,11 @@ class Utils ...@@ -57,6 +57,11 @@ class Utils
public static function isMFAEnforced($state, $rpIdentifier) public static function isMFAEnforced($state, $rpIdentifier)
{ {
if (isset($state['Attributes']['proxyMFAEnforced']) && !empty($state['Attributes']['proxyMFAEnforced'][0])) {
Logger::info(self::DEBUG_PREFIX . 'MFA was forced for this resource by config(resource attributes)');
return true;
}
if (!empty($state['Attributes'][AuthSwitcher::MFA_ENFORCE_SETTINGS])) { if (!empty($state['Attributes'][AuthSwitcher::MFA_ENFORCE_SETTINGS])) {
$settings = $state['Attributes'][AuthSwitcher::MFA_ENFORCE_SETTINGS]; $settings = $state['Attributes'][AuthSwitcher::MFA_ENFORCE_SETTINGS];
if (isset($settings[0])) { if (isset($settings[0])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment