Skip to content

Commit 80b519d

Browse files
committed
Remove redirect page
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
1 parent cba5ccf commit 80b519d

File tree

4 files changed

+7
-63
lines changed

4 files changed

+7
-63
lines changed

core/Controller/ClientFlowLoginController.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -242,34 +242,6 @@ public function grantPage($stateToken = '',
242242
);
243243
}
244244

245-
/**
246-
* @NoAdminRequired
247-
* @NoCSRFRequired
248-
* @UseSession
249-
*
250-
* @param string $stateToken
251-
* @param string $clientIdentifier
252-
* @return TemplateResponse
253-
*/
254-
public function redirectPage($stateToken = '',
255-
$clientIdentifier = '') {
256-
if(!$this->isValidToken($stateToken)) {
257-
return $this->stateTokenForbiddenResponse();
258-
}
259-
260-
return new TemplateResponse(
261-
$this->appName,
262-
'loginflow/redirect',
263-
[
264-
'urlGenerator' => $this->urlGenerator,
265-
'stateToken' => $stateToken,
266-
'clientIdentifier' => $clientIdentifier,
267-
'oauthState' => $this->session->get('oauth.state'),
268-
],
269-
'guest'
270-
);
271-
}
272-
273245
/**
274246
* @NoAdminRequired
275247
* @UseSession

core/routes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
5353
['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
5454
['name' => 'ClientFlowLogin#showAuthPickerPage', 'url' => '/login/flow', 'verb' => 'GET'],
55-
['name' => 'ClientFlowLogin#redirectPage', 'url' => '/login/flow/redirect', 'verb' => 'GET'],
5655
['name' => 'ClientFlowLogin#generateAppPassword', 'url' => '/login/flow', 'verb' => 'POST'],
5756
['name' => 'ClientFlowLogin#grantPage', 'url' => '/login/flow/grant', 'verb' => 'GET'],
5857
['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],

core/templates/loginflow/grant.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@
3939
<br/>
4040

4141
<p id="redirect-link">
42-
<a href="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.redirectPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState']])) ?>">
43-
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Grant access')) ?>">
44-
</a>
42+
<form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.generateAppPassword')) ?>">
43+
<input type="hidden" name="clientIdentifier" value="<?php p($_['clientIdentifier']) ?>" />
44+
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
45+
<input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
46+
<input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" />
47+
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Grant access')) ?>">
48+
</form>
4549
</p>
4650
</div>

core/templates/loginflow/redirect.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)