From 6a16df728858de1a021d27c1406c2cf1dfd86784 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 24 Apr 2017 21:11:48 +0200 Subject: 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 --- core/css/login/authpicker.css | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 core/css/login/authpicker.css (limited to 'core/css') diff --git a/core/css/login/authpicker.css b/core/css/login/authpicker.css new file mode 100644 index 00000000000..d0f32173d25 --- /dev/null +++ b/core/css/login/authpicker.css @@ -0,0 +1,5 @@ +.picker-window { + background: rgba(255,255,255,0.3); + border-radius: 3px; + margin-bottom:20px; +} \ No newline at end of file -- cgit v1.2.3 From 61af3f41f028103be677e0363cebf13bd6b582ea Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 25 Apr 2017 15:47:08 +0200 Subject: Fix auth flow background color and redirect view layout Signed-off-by: Jan-Christoph Borchardt --- core/css/login/authpicker.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'core/css') diff --git a/core/css/login/authpicker.css b/core/css/login/authpicker.css index d0f32173d25..85016ee6a0e 100644 --- a/core/css/login/authpicker.css +++ b/core/css/login/authpicker.css @@ -1,5 +1,9 @@ .picker-window { - background: rgba(255,255,255,0.3); + display: block; + padding: 10px; + margin-bottom: 20px; + background-color: rgba(0,0,0,.3); + color: #fff; border-radius: 3px; - margin-bottom:20px; -} \ No newline at end of file + cursor: default; +} -- cgit v1.2.3