File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -668,15 +668,19 @@ public static function receiveLogoutMessage(IdP $idp): void
668668 *
669669 * @param \SimpleSAML\IdP $idp
670670 * @param array<mixed> $association
671- * @param string $relayState
671+ * @param string|null $relayState
672672 * @return string
673673 */
674- public static function getLogoutURL (IdP $ idp , array $ association , string $ relayState ): string
674+ public static function getLogoutURL (IdP $ idp , array $ association , ? string $ relayState = null ): string
675675 {
676676 $ metadata = MetaDataStorageHandler::getMetadataHandler ();
677677 $ spMetadata = $ metadata ->getMetaDataConfig ($ association ['adfs:entityID ' ], 'adfs-sp-remote ' );
678+ $ params = ['assocId ' => urlencode ($ association ['id ' ])];
679+ if ($ relayState !== null ) {
680+ $ params ['relayState ' ] = urlencode ($ relayState );
681+ }
678682 $ returnTo = Module::getModuleURL (
679- 'adfs/idp/prp.php?assocId= ' . urlencode ( $ association [ " id " ]) . ' &relayState= ' . urlencode ( $ relayState ),
683+ 'adfs/idp/prp.php ' , $ params
680684 );
681685 return $ spMetadata ->getValue ('prp ' ) . '?wa=wsignoutcleanup1.0&wreply= ' . urlencode ($ returnTo );
682686 }
You can’t perform that action at this time.
0 commit comments