diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-01-25 19:47:58 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-03-28 11:28:45 +0300 |
commit | 80388663afa718a884e63de653e0cba545c7403f (patch) | |
tree | f504b8f59287f6d3f7fd5a00e78bd583cad00b35 /core/Controller | |
parent | 3e067edcbe80797a70118f613ac4b752ce512992 (diff) |
Add direct arg to login flow
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-Authored-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/ClientFlowLoginController.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index e067f0ff6b5..ad8bc8eb086 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -162,12 +162,8 @@ class ClientFlowLoginController extends Controller { * @PublicPage * @NoCSRFRequired * @UseSession - * - * @param string $clientIdentifier - * - * @return StandaloneTemplateResponse */ - public function showAuthPickerPage($clientIdentifier = '', $user = '') { + public function showAuthPickerPage(string $clientIdentifier = '', string $user = '', int $direct = 0): StandaloneTemplateResponse { $clientName = $this->getClientName(); $client = null; if ($clientIdentifier !== '') { @@ -219,6 +215,7 @@ class ClientFlowLoginController extends Controller { 'serverHost' => $this->getServerPath(), 'oauthState' => $this->session->get('oauth.state'), 'user' => $user, + 'direct' => $direct, ], 'guest' ); @@ -232,13 +229,10 @@ class ClientFlowLoginController extends Controller { * @NoCSRFRequired * @NoSameSiteCookieRequired * @UseSession - * - * @param string $stateToken - * @param string $clientIdentifier - * @return StandaloneTemplateResponse */ - public function grantPage($stateToken = '', - $clientIdentifier = '') { + public function grantPage(string $stateToken = '', + string $clientIdentifier = '', + int $direct = 0): StandaloneTemplateResponse { if (!$this->isValidToken($stateToken)) { return $this->stateTokenForbiddenResponse(); } @@ -268,6 +262,7 @@ class ClientFlowLoginController extends Controller { 'stateToken' => $stateToken, 'serverHost' => $this->getServerPath(), 'oauthState' => $this->session->get('oauth.state'), + 'direct' => $direct, ], 'guest' ); |