File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
lib/private/Authentication/Login Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1010
1111use OC \Core \Controller \ClientFlowLoginV2Controller ;
1212use OCP \ISession ;
13+ use OCP \IURLGenerator ;
1314
1415class FlowV2EphemeralSessionsCommand extends ALoginCommand {
1516 public function __construct (
1617 private ISession $ session ,
18+ private IURLGenerator $ urlGenerator ,
1719 ) {
1820 }
1921
2022 public function process (LoginData $ loginData ): LoginResult {
21- if (str_starts_with ($ loginData ->getRedirectUrl () ?? '' , '/login/v2/grant ' )) {
23+ $ loginV2GrantRoute = $ this ->urlGenerator ->linkToRoute ('core.ClientFlowLoginV2.grantPage ' );
24+ if (str_starts_with ($ loginData ->getRedirectUrl () ?? '' , $ loginV2GrantRoute )) {
2225 $ this ->session ->set (ClientFlowLoginV2Controller::EPHEMERAL_NAME , true );
2326 }
2427
You can’t perform that action at this time.
0 commit comments