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 private ISession $ session ;
1617 private IURLGenerator $ urlGenerator ;
1718
1819 public function __construct (
1920 ISession $ session ,
21+ IURLGenerator $ urlGenerator ,
2022 ) {
2123 $ this ->session = $ session ;
2224 $ this ->urlGenerator = $ urlGenerator ;
2325 }
2426
2527 public function process (LoginData $ loginData ): LoginResult {
26- if (str_starts_with ($ loginData ->getRedirectUrl () ?? '' , '/login/v2/grant ' )) {
28+ $ loginV2GrantRoute = $ this ->urlGenerator ->linkToRoute ('core.ClientFlowLoginV2.grantPage ' );
29+ if (str_starts_with ($ loginData ->getRedirectUrl () ?? '' , $ loginV2GrantRoute )) {
2730 $ this ->session ->set (ClientFlowLoginV2Controller::EPHEMERAL_NAME , true );
2831 }
2932
You can’t perform that action at this time.
0 commit comments