$('#submit-app-token-login').click(function(e) {
e.preventDefault();
- window.location.href = 'nc://'
- + encodeURIComponent($('#user').val()) + ':' + encodeURIComponent($('#password').val())
- + '@' + encodeURIComponent($('#serverHost').val());
+ window.location.href = 'nc://login/server:'
+ + encodeURIComponent($('#serverHost').val())
+ + "&user:" + encodeURIComponent($('#user').val())
+ + "&password:" + encodeURIComponent($('#password').val());
});
});
->method('getServerHost')
->willReturn('example.com');
- $expected = new Http\RedirectResponse('nc://MyLoginName:MyGeneratedToken@example.com');
+ $expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken');
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken'));
}
->method('getServerHost')
->willReturn('example.com');
- $expected = new Http\RedirectResponse('nc://MyLoginName:MyGeneratedToken@example.com');
+ $expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken');
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken'));
}
}