Re: [openstack-dev] [Horizon] Handling 401 in new REST API

2016-01-28 Thread David Lyle
I think that's the sane thing to do.

David

On Thu, Jan 28, 2016 at 2:55 AM, Richard Jones  wrote:
> Hi fellow angular/REST Horizon developers,
>
> I'd like to propose that we handle HTTP 401 responses at the core of the new
> angular code interfacing to our new REST API so that *any* 401 just does
> basically what the Django code used to: redirect to the login page with a
> "from".
>
> What do y'all think?
>
>
> Richard
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Horizon] Handling 401 in new REST API

2016-01-28 Thread Thai Q Tran
I am assuming that you meant redirecting on the server side. We already have a similar one in place on the client side. https://github.com/openstack/horizon/blob/master/horizon/static/framework/framework.module.js#L65
 
Currently, you're not able to hit the REST layer directly anyway, You get a "request must be ajax" message. You have to login and then use a REST client if you want data. So here's my noob question of the day, what are we gaining in addition if we redirect on the server side? Totally not meant to be a show stopper, just wondering what the benefits are.
 
- Original message -From: David Lyle To: "OpenStack Development Mailing List (not for usage questions)" Cc:Subject: Re: [openstack-dev] [Horizon] Handling 401 in new REST APIDate: Thu, Jan 28, 2016 8:46 AM 
I think that's the sane thing to do.DavidOn Thu, Jan 28, 2016 at 2:55 AM, Richard Jones  wrote:> Hi fellow angular/REST Horizon developers,>> I'd like to propose that we handle HTTP 401 responses at the core of the new> angular code interfacing to our new REST API so that *any* 401 just does> basically what the Django code used to: redirect to the login page with a> "from".>> What do y'all think?>>>     Richard>>> __> OpenStack Development Mailing List (not for usage questions)> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>__OpenStack Development Mailing List (not for usage questions)Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribehttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 
 


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Horizon] Handling 401 in new REST API

2016-01-28 Thread Richard Jones
Hmm. That client-side redirect isn't working consistently then. More
investigation required...

On 29 January 2016 at 05:04, Thai Q Tran <tqt...@us.ibm.com> wrote:

> I am assuming that you meant redirecting on the server side. We already
> have a similar one in place on the client side.
> https://github.com/openstack/horizon/blob/master/horizon/static/framework/framework.module.js#L65
>
> Currently, you're not able to hit the REST layer directly anyway, You get
> a "request must be ajax" message. You have to login and then use a REST
> client if you want data. So here's my noob question of the day, what are we
> gaining in addition if we redirect on the server side? Totally not meant to
> be a show stopper, just wondering what the benefits are.
>
>
> - Original message -
> From: David Lyle <dkly...@gmail.com>
> To: "OpenStack Development Mailing List (not for usage questions)" <
> openstack-dev@lists.openstack.org>
> Cc:
> Subject: Re: [openstack-dev] [Horizon] Handling 401 in new REST API
> Date: Thu, Jan 28, 2016 8:46 AM
>
> I think that's the sane thing to do.
>
> David
>
> On Thu, Jan 28, 2016 at 2:55 AM, Richard Jones <r1chardj0...@gmail.com>
> wrote:
> > Hi fellow angular/REST Horizon developers,
> >
> > I'd like to propose that we handle HTTP 401 responses at the core of the
> new
> > angular code interfacing to our new REST API so that *any* 401 just does
> > basically what the Django code used to: redirect to the login page with a
> > "from".
> >
> > What do y'all think?
> >
> >
> > Richard
> >
> >
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Horizon] Handling 401 in new REST API

2016-01-28 Thread Richard Jones
Hi fellow angular/REST Horizon developers,

I'd like to propose that we handle HTTP 401 responses at the core of the
new angular code interfacing to our new REST API so that *any* 401 just
does basically what the Django code used to: redirect to the login page
with a "from".

What do y'all think?


Richard
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev