File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -645,16 +645,20 @@ public static function receiveLogoutMessage(IdP $idp): void
645645 * accepts an association array, and returns a URL that can be accessed to terminate the association
646646 *
647647 * @param \SimpleSAML\IdP $idp
648- * @param array $association
649- * @param string $relayState
648+ * @param array<mixed> $association
649+ * @param string|null $relayState
650650 * @return string
651651 */
652- public static function getLogoutURL (IdP $ idp , array $ association , string $ relayState ): string
652+ public static function getLogoutURL (IdP $ idp , array $ association , ? string $ relayState = null ): string
653653 {
654654 $ metadata = MetaDataStorageHandler::getMetadataHandler ();
655655 $ spMetadata = $ metadata ->getMetaDataConfig ($ association ['adfs:entityID ' ], 'adfs-sp-remote ' );
656+ $ params = ['assocId ' => urlencode ($ association ['id ' ])];
657+ if ($ relayState !== null ) {
658+ $ params ['relayState ' ] = urlencode ($ relayState );
659+ }
656660 $ returnTo = Module::getModuleURL (
657- 'adfs/idp/prp.php?assocId= ' . urlencode ( $ association [ " id " ]) . ' &relayState= ' . urlencode ( $ relayState ),
661+ 'adfs/idp/prp.php ' , $ params
658662 );
659663 return $ spMetadata ->getValue ('prp ' ) . '?wa=wsignoutcleanup1.0&wreply= ' . urlencode ($ returnTo );
660664 }
You can’t perform that action at this time.
0 commit comments