Skip to content
Snippets Groups Projects

feat: force MFA based on proxyMFAEnforced state attribute

Merged Jiří Prokop requested to merge mfa_proxy_forced into main
1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
+ 5
0
@@ -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])) {
Loading