Follow the redirect url on direct login

This makes sure the auth flow also works with the direct login.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-07-11 13:35:15 +02:00
parent 7ced27bef8
commit b6531dbca7
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -327,7 +327,7 @@ class SAMLController extends Controller {
public function selectUserBackEnd($redirectUrl) {
$loginUrls = [
'directLogin' => [
'url' => $this->getDirectLoginUrl(),
'url' => $this->getDirectLoginUrl($redirectUrl),
'display-name' => $this->l->t('Direct log in')
],
'ssoLogin' => [
@ -384,8 +384,11 @@ class SAMLController extends Controller {
*
* @return string
*/
private function getDirectLoginUrl() {
$directUrl = $this->urlGenerator->linkToRouteAbsolute('core.login.tryLogin', ['direct' => '1']);
private function getDirectLoginUrl($redirectUrl) {
$directUrl = $this->urlGenerator->linkToRouteAbsolute('core.login.tryLogin', [
'direct' => '1',
'redirect_url' => $redirectUrl,
]);
return $directUrl;
}