@@ -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
@@ -101,7 +101,7 @@ public function landing(string $token, $user = ''): Response {
101101 #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE )]
102102 #[UseSession]
103103 #[FrontpageRoute(verb: 'GET ' , url: '/login/v2/flow ' )]
104- public function showAuthPickerPage ($ user = '' ): StandaloneTemplateResponse {
104+ public function showAuthPickerPage (string $ user = '' , int $ direct = 0 ): StandaloneTemplateResponse {
105105 try {
106106 $ flow = $ this ->getFlowByLoginToken ();
107107 } catch (LoginFlowV2NotFoundException $ e ) {
@@ -123,6 +123,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
123123 'urlGenerator ' => $ this ->urlGenerator ,
124124 'stateToken ' => $ stateToken ,
125125 'user ' => $ user ,
126+ 'direct ' => $ direct ,
126127 ],
127128 'guest '
128129 );
@@ -136,7 +137,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
136137 #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE )]
137138 #[UseSession]
138139 #[FrontpageRoute(verb: 'GET ' , url: '/login/v2/grant ' )]
139- public function grantPage (?string $ stateToken ): StandaloneTemplateResponse {
140+ public function grantPage (?string $ stateToken, int $ direct = 0 ): StandaloneTemplateResponse {
140141 if ($ stateToken === null ) {
141142 return $ this ->stateTokenMissingResponse ();
142143 }
@@ -163,6 +164,7 @@ public function grantPage(?string $stateToken): StandaloneTemplateResponse {
163164 'instanceName ' => $ this ->defaults ->getName (),
164165 'urlGenerator ' => $ this ->urlGenerator ,
165166 'stateToken ' => $ stateToken ,
167+ 'direct ' => $ direct ,
166168 ],
167169 'guest '
168170 );
0 commit comments