server/tests/Core/Controller
Lukas Reschke 6a16df7288
Add new auth flow
This implements the basics for the new app-password based authentication flow for our clients.
The current implementation tries to keep it as simple as possible and works the following way:

1. Unauthenticated client opens `/index.php/login/flow`
2. User will be asked whether they want to grant access to the client
3. If accepted the user has the chance to do so using existing App Token or automatically generate an app password.

If the user chooses to use an existing app token then that one will simply be redirected to the `nc://` protocol handler.
While we can improve on that in the future, I think keeping this smaller at the moment has its advantages. Also, in the
near future we have to think about an automatic migration endpoint so there's that anyways :-)

If the user chooses to use the regular login the following happens:

1. A session state token is written to the session
2. User is redirected to the login page
3. If successfully authenticated they will be redirected to a page redirecting to the POST controller
4. The POST controller will check if the CSRF token as well as the state token is correct, if yes the user will be redirected to the `nc://` protocol handler.

This approach is quite simple but also allows to be extended in the future. One could for example allow external websites to consume this authentication endpoint as well.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-25 20:18:49 +02:00
..
AvatarControllerTest.php Check the mimetype before reading the content and catch exception 2016-10-18 16:22:20 +02:00
ChangePasswordControllerTest.php Add bruteforce protection to changePersonalPassword 2017-04-18 17:55:51 +02:00
ClientFlowLoginControllerTest.php Add new auth flow 2017-04-25 20:18:49 +02:00
CssControllerTest.php Fix gzip files for Safari 2017-03-29 00:11:51 -06:00
JsControllerTest.php Fix gzip files for Safari 2017-03-29 00:11:51 -06:00
LoginControllerTest.php Fix remember redirect_url on failed login attempts 2017-04-25 09:38:19 +02:00
LostControllerTest.php Rename renderHTML to renderHtml 2017-04-19 15:46:41 -05:00
OCSControllerTest.php Adjust existing bruteforce protection code 2017-04-14 13:42:40 +02:00
PreviewControllerTest.php Add cache 1 day cache to preview endpoint 2016-11-03 14:00:33 +01:00
TwoFactorChallengeControllerTest.php fix coding style and increase code coverage 2017-01-11 11:01:54 +01:00
UserControllerTest.php Adds user controller tests 2016-12-30 13:26:26 +01:00