Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp-module-authswitcher
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp-module-authswitcher
Merge requests
!57
feat: force MFA based on proxyMFAEnforced state attribute
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
feat: force MFA based on proxyMFAEnforced state attribute
mfa_proxy_forced
into
main
Overview
5
Commits
1
Pipelines
2
Changes
1
Merged
Jiří Prokop
requested to merge
mfa_proxy_forced
into
main
1 year ago
Overview
5
Commits
1
Pipelines
2
Changes
1
Expand
closes
PRX-312
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
68db385c
1 commit,
1 year ago
1 file
+
5
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
lib/Utils.php
+
5
−
0
Options
@@ -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