Skip to content

Commit 18bf916

Browse files
committed
Store the selected zone in the state for later use
1 parent 0eeef73 commit 18bf916

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/simplesamlphp-changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
This document lists the changes between versions of SimpleSAMLphp.
66
See the upgrade notes for specific information about upgrading.
77

8+
## Version 2.0.4
9+
10+
Released TBD
11+
12+
* The source that was selected by the SourceSelector is now available in the state.
13+
* The zone that was selected by the SourceIPSelector is now available in the state.
14+
815
## Version 2.0.3
916

1017
Released 2023-03-29

modules/core/src/Auth/Source/SourceIPSelector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ protected function selectAuthSource(/** @scrutinizer ignore-unused */ array &$st
101101
$ip
102102
));
103103
$source = $zone['source'];
104+
$state['sourceIPSelector:zone'] = $name;
104105
break;
105106
}
106107
}
107108
}
108109

109110
if ($source === $this->defaultSource) {
110111
Logger::info("core:SourceIPSelector: no match on client IP; selecting default zone");
112+
$state['sourceIPSelector:zone'] = 'default';
111113
}
112114

113115
return $source;

0 commit comments

Comments
 (0)