Merge pull request #6386 from nextcloud/12-6247
[stable12] Fix undefined index oauthState
This commit is contained in:
commit
7c3148f1aa
|
@ -193,6 +193,7 @@ class ClientFlowLoginController extends Controller {
|
||||||
'urlGenerator' => $this->urlGenerator,
|
'urlGenerator' => $this->urlGenerator,
|
||||||
'stateToken' => $stateToken,
|
'stateToken' => $stateToken,
|
||||||
'serverHost' => $this->request->getServerHost(),
|
'serverHost' => $this->request->getServerHost(),
|
||||||
|
'oauthState' => $this->session->get('oauth.state'),
|
||||||
],
|
],
|
||||||
'guest'
|
'guest'
|
||||||
);
|
);
|
||||||
|
|
|
@ -149,6 +149,11 @@ class ClientFlowLoginControllerTest extends TestCase {
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('set')
|
->method('set')
|
||||||
->with('client.flow.state.token', 'StateToken');
|
->with('client.flow.state.token', 'StateToken');
|
||||||
|
$this->session
|
||||||
|
->expects($this->once())
|
||||||
|
->method('get')
|
||||||
|
->with('oauth.state')
|
||||||
|
->willReturn('OauthStateToken');
|
||||||
$this->defaults
|
$this->defaults
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getName')
|
->method('getName')
|
||||||
|
@ -168,6 +173,7 @@ class ClientFlowLoginControllerTest extends TestCase {
|
||||||
'urlGenerator' => $this->urlGenerator,
|
'urlGenerator' => $this->urlGenerator,
|
||||||
'stateToken' => 'StateToken',
|
'stateToken' => 'StateToken',
|
||||||
'serverHost' => 'example.com',
|
'serverHost' => 'example.com',
|
||||||
|
'oauthState' => 'OauthStateToken',
|
||||||
],
|
],
|
||||||
'guest'
|
'guest'
|
||||||
);
|
);
|
||||||
|
@ -199,6 +205,11 @@ class ClientFlowLoginControllerTest extends TestCase {
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('set')
|
->method('set')
|
||||||
->with('client.flow.state.token', 'StateToken');
|
->with('client.flow.state.token', 'StateToken');
|
||||||
|
$this->session
|
||||||
|
->expects($this->once())
|
||||||
|
->method('get')
|
||||||
|
->with('oauth.state')
|
||||||
|
->willReturn('OauthStateToken');
|
||||||
$this->defaults
|
$this->defaults
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
->method('getName')
|
->method('getName')
|
||||||
|
@ -218,6 +229,7 @@ class ClientFlowLoginControllerTest extends TestCase {
|
||||||
'urlGenerator' => $this->urlGenerator,
|
'urlGenerator' => $this->urlGenerator,
|
||||||
'stateToken' => 'StateToken',
|
'stateToken' => 'StateToken',
|
||||||
'serverHost' => 'example.com',
|
'serverHost' => 'example.com',
|
||||||
|
'oauthState' => 'OauthStateToken',
|
||||||
],
|
],
|
||||||
'guest'
|
'guest'
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue