File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1717use Exception ;
1818use Psr \Http \Message \ServerRequestInterface ;
1919use SimpleSAML \Auth \Simple ;
20+ use SimpleSAML \Auth \State ;
2021use SimpleSAML \Error ;
2122use SimpleSAML \Module \oidc \ClaimTranslatorExtractor ;
2223use SimpleSAML \Module \oidc \Controller \LogoutController ;
@@ -164,6 +165,8 @@ private function prepareStateArray(
164165 $ state ['Source ' ] = ['entityid ' => $ state ['Oidc ' ]['OpenIdProviderMetadata ' ]['issuer ' ]];
165166 $ state ['Destination ' ] = ['entityid ' => $ state ['Oidc ' ]['RelyingPartyMetadata ' ]['id ' ]];
166167
168+ $ state [State::RESTART ] = $ request ->getUri ()->__toString ();
169+
167170 return $ state ;
168171 }
169172
Original file line number Diff line number Diff line change 1515namespace spec \SimpleSAML \Module \oidc \Services ;
1616
1717use Laminas \Diactoros \ServerRequest ;
18+ use Laminas \Diactoros \Uri ;
1819use PhpSpec \ObjectBehavior ;
1920use Prophecy \Argument ;
2021use SimpleSAML \Auth \Simple ;
@@ -56,6 +57,10 @@ class AuthenticationServiceSpec extends ObjectBehavior
5657 ],
5758 ];
5859
60+ public static $ uri = 'https://some-server/authorize.php?abc=efg ' ;
61+
62+
63+
5964 /**
6065 * @param ServerRequest $request
6166 * @param ClientEntity $clientEntity
@@ -81,6 +86,7 @@ public function let(
8186 ClaimTranslatorExtractor $ claimTranslatorExtractor
8287 ): void {
8388 $ request ->getQueryParams ()->willReturn (self ::AUTHZ_REQUEST_PARAMS );
89+ $ request ->getUri ()->willReturn (new Uri (self ::$ uri ));
8490 $ clientEntity ->getAuthSourceId ()->willReturn (self ::AUTH_SOURCE );
8591 $ clientEntity ->toArray ()->willReturn (self ::CLIENT_ENTITY );
8692 $ clientRepository ->findById (self ::CLIENT_ENTITY ['id ' ])->willReturn ($ clientEntity );
You can’t perform that action at this time.
0 commit comments