-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flow #6879
Fix flow #6879
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,7 +161,7 @@ public function testShowAuthPickerPageWithOcsHeader() { | |
$this->request | ||
->expects($this->once()) | ||
->method('getServerHost') | ||
->willReturn('example.com'); | ||
->willReturn('http://example.com'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is cheating? make sure it actually calls There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm actually wouldnt it return example.com? Since it's just getServerHost ... Tests need better thinking xD There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
|
||
$expected = new TemplateResponse( | ||
'core', | ||
|
@@ -172,7 +172,7 @@ public function testShowAuthPickerPageWithOcsHeader() { | |
'instanceName' => 'ExampleCloud', | ||
'urlGenerator' => $this->urlGenerator, | ||
'stateToken' => 'StateToken', | ||
'serverHost' => 'example.com', | ||
'serverHost' => 'http://example.com', | ||
'oauthState' => 'OauthStateToken', | ||
], | ||
'guest' | ||
|
@@ -217,7 +217,7 @@ public function testShowAuthPickerPageWithOauth() { | |
$this->request | ||
->expects($this->once()) | ||
->method('getServerHost') | ||
->willReturn('example.com'); | ||
->willReturn('http://example.com'); | ||
|
||
$expected = new TemplateResponse( | ||
'core', | ||
|
@@ -228,7 +228,7 @@ public function testShowAuthPickerPageWithOauth() { | |
'instanceName' => 'ExampleCloud', | ||
'urlGenerator' => $this->urlGenerator, | ||
'stateToken' => 'StateToken', | ||
'serverHost' => 'example.com', | ||
'serverHost' => 'http://example.com', | ||
'oauthState' => 'OauthStateToken', | ||
], | ||
'guest' | ||
|
@@ -426,9 +426,9 @@ public function testGeneratePasswordWithPassword() { | |
$this->request | ||
->expects($this->once()) | ||
->method('getServerHost') | ||
->willReturn('example.com'); | ||
->willReturn('http://example.com'); | ||
|
||
$expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken'); | ||
$expected = new Http\RedirectResponse('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken'); | ||
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken')); | ||
} | ||
|
||
|
@@ -574,9 +574,9 @@ public function testGeneratePasswordWithoutPassword() { | |
$this->request | ||
->expects($this->once()) | ||
->method('getServerHost') | ||
->willReturn('example.com'); | ||
->willReturn('http://example.com'); | ||
|
||
$expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken'); | ||
$expected = new Http\RedirectResponse('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken'); | ||
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken')); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work if you have pretty urls. Since then you don't have index.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an alternative suggestion? Even on Android for login flow we always use index.php.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got an idea. Testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support for pretty urls.