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
Commits
c49bfd80
Verified
Commit
c49bfd80
authored
3 years ago
by
Pavel Břoušek
Browse files
Options
Downloads
Patches
Plain Diff
feat: realm option for GetMfaTokensPrivacyIDEA
allows service account in non-default realm
parent
b4d04d9b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!31
Improvements for problematic situations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-0
1 addition, 0 deletions
README.md
lib/Auth/Process/GetMfaTokensPrivacyIDEA.php
+6
-0
6 additions, 0 deletions
lib/Auth/Process/GetMfaTokensPrivacyIDEA.php
with
7 additions
and
0 deletions
README.md
+
1
−
0
View file @
c49bfd80
...
...
@@ -38,6 +38,7 @@ Use this filter to read user mfa tokens from PrivacyIDEA server to state attribu
'tokens_Attr'
=>
'privacyIDEATokens'
,
'privacy_idea_username'
=>
'admin'
,
'privacy_idea_passwd'
=>
'secret'
,
//'privacy_idea_realm' => 'superadminrealm', // optional
'privacy_idea_domain'
=>
'https://mfa.id.muni.cz'
,
'tokens_type'
=>
[
'TOTP'
,
...
...
This diff is collapsed.
Click to expand it.
lib/Auth/Process/GetMfaTokensPrivacyIDEA.php
+
6
−
0
View file @
c49bfd80
...
...
@@ -22,6 +22,8 @@ class GetMfaTokensPrivacyIDEA extends \SimpleSAML\Auth\ProcessingFilter
private
$privacy_idea_passwd
;
private
$privacy_idea_realm
;
private
$privacy_idea_domain
;
private
$tokens_type
=
[
'TOTP'
,
'WebAuthn'
];
...
...
@@ -42,6 +44,7 @@ class GetMfaTokensPrivacyIDEA extends \SimpleSAML\Auth\ProcessingFilter
$this
->
tokens_attr
=
$config
->
getString
(
'tokens_Attr'
,
$this
->
tokens_attr
);
$this
->
privacy_idea_username
=
$config
->
getString
(
'privacy_idea_username'
);
$this
->
privacy_idea_passwd
=
$config
->
getString
(
'privacy_idea_passwd'
);
$this
->
privacy_idea_realm
=
$config
->
getString
(
'privacy_idea_realm'
,
null
);
$this
->
privacy_idea_domain
=
$config
->
getString
(
'privacy_idea_domain'
);
$this
->
tokens_type
=
$config
->
getArray
(
'tokens_type'
,
$this
->
tokens_type
);
$this
->
user_attribute
=
$config
->
getString
(
'user_attribute'
,
$this
->
user_attribute
);
...
...
@@ -98,6 +101,9 @@ class GetMfaTokensPrivacyIDEA extends \SimpleSAML\Auth\ProcessingFilter
'username'
=>
$this
->
privacy_idea_username
,
'password'
=>
$this
->
privacy_idea_passwd
,
];
if
(
null
!==
$this
->
privacy_idea_realm
)
{
$data
[
'realm'
]
=
$this
->
privacy_idea_realm
;
}
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$this
->
privacy_idea_domain
.
'/auth'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment