@@ -84,15 +84,15 @@ public function poll(string $token): JSONResponse {
8484 #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE )]
8585 #[UseSession]
8686 #[FrontpageRoute(verb: 'GET ' , url: '/login/v2/flow/{token} ' )]
87- public function landing (string $ token , $ user = '' ): Response {
87+ public function landing (string $ token , $ user = '' , int $ direct = 0 ): Response {
8888 if (!$ this ->loginFlowV2Service ->startLoginFlow ($ token )) {
8989 return $ this ->loginTokenForbiddenResponse ();
9090 }
9191
9292 $ this ->session ->set (self ::TOKEN_NAME , $ token );
9393
9494 return new RedirectResponse (
95- $ this ->urlGenerator ->linkToRouteAbsolute ('core.ClientFlowLoginV2.showAuthPickerPage ' , ['user ' => $ user ])
95+ $ this ->urlGenerator ->linkToRouteAbsolute ('core.ClientFlowLoginV2.showAuthPickerPage ' , ['user ' => $ user, ' direct ' => $ direct ])
9696 );
9797 }
9898
@@ -103,7 +103,7 @@ public function landing(string $token, $user = ''): Response {
103103 #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE )]
104104 #[UseSession]
105105 #[FrontpageRoute(verb: 'GET ' , url: '/login/v2/flow ' )]
106- public function showAuthPickerPage ($ user = '' ): StandaloneTemplateResponse {
106+ public function showAuthPickerPage (string $ user = '' , int $ direct = 0 ): StandaloneTemplateResponse {
107107 try {
108108 $ flow = $ this ->getFlowByLoginToken ();
109109 } catch (LoginFlowV2NotFoundException $ e ) {
@@ -125,6 +125,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
125125 'urlGenerator ' => $ this ->urlGenerator ,
126126 'stateToken ' => $ stateToken ,
127127 'user ' => $ user ,
128+ 'direct ' => $ direct ,
128129 ],
129130 'guest '
130131 );
@@ -138,7 +139,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
138139 #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE )]
139140 #[UseSession]
140141 #[FrontpageRoute(verb: 'GET ' , url: '/login/v2/grant ' )]
141- public function grantPage (?string $ stateToken ): StandaloneTemplateResponse {
142+ public function grantPage (?string $ stateToken, int $ direct = 0 ): StandaloneTemplateResponse {
142143 if ($ stateToken === null ) {
143144 return $ this ->stateTokenMissingResponse ();
144145 }
@@ -165,6 +166,7 @@ public function grantPage(?string $stateToken): StandaloneTemplateResponse {
165166 'instanceName ' => $ this ->defaults ->getName (),
166167 'urlGenerator ' => $ this ->urlGenerator ,
167168 'stateToken ' => $ stateToken ,
169+ 'direct ' => $ direct ,
168170 ],
169171 'guest '
170172 );
0 commit comments