summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Controller/ClientFlowLoginController.php1
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php12
2 files changed, 13 insertions, 0 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index bec81a89d53..5767c9e1c62 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -193,6 +193,7 @@ class ClientFlowLoginController extends Controller {
'urlGenerator' => $this->urlGenerator,
'stateToken' => $stateToken,
'serverHost' => $this->request->getServerHost(),
+ 'oauthState' => $this->session->get('oauth.state'),
],
'guest'
);
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 1132c0f540c..89253f13038 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -149,6 +149,11 @@ class ClientFlowLoginControllerTest extends TestCase {
->expects($this->once())
->method('set')
->with('client.flow.state.token', 'StateToken');
+ $this->session
+ ->expects($this->once())
+ ->method('get')
+ ->with('oauth.state')
+ ->willReturn('OauthStateToken');
$this->defaults
->expects($this->once())
->method('getName')
@@ -168,6 +173,7 @@ class ClientFlowLoginControllerTest extends TestCase {
'urlGenerator' => $this->urlGenerator,
'stateToken' => 'StateToken',
'serverHost' => 'example.com',
+ 'oauthState' => 'OauthStateToken',
],
'guest'
);
@@ -199,6 +205,11 @@ class ClientFlowLoginControllerTest extends TestCase {
->expects($this->once())
->method('set')
->with('client.flow.state.token', 'StateToken');
+ $this->session
+ ->expects($this->once())
+ ->method('get')
+ ->with('oauth.state')
+ ->willReturn('OauthStateToken');
$this->defaults
->expects($this->once())
->method('getName')
@@ -218,6 +229,7 @@ class ClientFlowLoginControllerTest extends TestCase {
'urlGenerator' => $this->urlGenerator,
'stateToken' => 'StateToken',
'serverHost' => 'example.com',
+ 'oauthState' => 'OauthStateToken',
],
'guest'
);