On 07/14/2014 02:44 AM, Sheldon wrote:
On 07/14/2014 06:16 AM, alinefm(a)linux.vnet.ibm.com wrote:
> From: Aline Manera <alinefm(a)linux.vnet.ibm.com>
>
> This patch set removes useless files related to former login design
> and redirect
> user in frontend after logging - that way frontend can store user
> information
> for authorization matters.
>
> The patch 2 has 2 problems:
> 1) the next URL is encoded using base64
> So in UI I need to decode it. How do I do that?
have checked the kimchi source code.
there is a base64 util in source code.
ui/js/novnc/base64.js
but we should check it is.
The alphabet of urlsafe_b64decode uses '-' instead of '+' and
'_'
instead of '/'.
Thanks, Sheldon!
I tried it without luck so I will use lastPage cookie to store the next_url
That way we keep consistence from where get the next page info
>
> 2) while using kimchi.cookie.get() to get the lastPage it returns the
> URL with ""
> So the redirection fails as it tries to redirect the user to
> "/#tabs/guests"
> How do I remove those "" around the cookie value?
>
> Any help is welcome!
>
> Aline Manera (3):
> Remove former login design files
> Remove special console rules from nginx configuration
> Let frontend redirect user after logging
>
> src/kimchi/auth.py | 6 --
> src/kimchi/root.py | 19 +-----
> src/nginx.conf.in | 11 ----
> ui/js/src/kimchi.login.js | 73 ++++++++++++++++++++++
> ui/js/src/kimchi.login_window.js | 128
> ---------------------------------------
> ui/pages/login-window.html.tmpl | 53 ----------------
> ui/pages/login.html.tmpl | 36 ++---------
> 7 files changed, 78 insertions(+), 248 deletions(-)
> create mode 100644 ui/js/src/kimchi.login.js
> delete mode 100644 ui/js/src/kimchi.login_window.js
> delete mode 100644 ui/pages/login-window.html.tmpl
>