This repository was archived by the owner on Sep 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 22 All notable changes to this project will be documented in this file.
33
44 ## [ Unreleased]
5+ [ Added]
6+ - Added support for MFA
57
68 ## [ v1.2.2]
79 [ Removed]
Original file line number Diff line number Diff line change 2323const WARNING_TITLE = 'title ' ;
2424const WARNING_TEXT = 'text ' ;
2525
26+ const MFA_IDENTIFIER = "https://refeds.org/profile/mfa " ;
27+ const MFA_IDP = "https://stepup.elixir-finland.org/idp/shibboleth " ;
28+
2629$ warningIsOn = false ;
2730$ warningUserCanContinue = null ;
2831$ warningTitle = null ;
2932$ warningText = null ;
3033$ config = null ;
34+ $ authContextClassRef = null ;
3135
3236try {
3337 $ config = SimpleSAML_Configuration::getConfig (WARNING_CONFIG_FILE_NAME );
6872 $ this ->data ['header ' ] = $ this ->t ('{elixir:elixir:warning} ' );
6973}
7074
75+ if (isset ($ this ->data ['AuthnContextClassRef ' ])) {
76+ $ authContextClassRef = $ this ->data ['AuthnContextClassRef ' ];
77+ }
78+
7179$ this ->includeAtTemplateBase ('includes/header.php ' );
7280
81+ if ($ authContextClassRef != null ) {
82+ foreach ($ authContextClassRef as $ value ) {
83+ if (substr ($ value , 0 , strlen (MFA_IDENTIFIER )) === MFA_IDENTIFIER ) {
84+ SimpleSAML \Logger::info ("Redirecting to " . MFA_IDP );
85+ $ url = $ this ->getContinueUrl (MFA_IDP );
86+ SimpleSAML \Utils \HTTP ::redirectTrustedURL ($ url );
87+ exit ;
88+ }
89+ }
90+ }
7391
7492if ($ warningIsOn ) {
7593 if ($ warningUserCanContinue ) {
You can’t perform that action at this time.
0 commit comments