gluons/tools.py

Txs,
Miguel

On Sat, Jan 29, 2011 at 12:29 AM, Niphlod <niph...@gmail.com> wrote:

> call_or_redirect() is the real "addition" here .... you can use both a
> URL or a function to manage on_failed_authentication and
> on_failed_authorization ... take a look in gluon/utils.py
>
> On Jan 28, 1:48 am, miguel <mig.e.lo...@gmail.com> wrote:
> > I suppose this is mentioned in the Change Log by:
> > "on_failed_authorization can be a function, thanks Niphold"
> >
> > How is this used? could the function be a lambda, does it take params,
> > is it an action (i.e. a controller function)?
> >
> > Also, is it possible to allow the usual login redirection in case it
> > is not a service call? I'm thinking in these lines:
> >
> > def theFunction():
> >     if request.function == 'call':
> >         # return case forservice call
> >     else:
> >         # redirect to login form
> >
> > This would be useful for publishing the same service both for browsers
> > and for other apps, like it is mentioned in p://
> www.web2pyslices.com/main/slices/take_slice/48
> > (see "Authentication"). This solution would also be useful for other
> > non-browser-based clients. Would it work? How is the function used?
> >
> > Txs,
> > Miguel
> >
> > ---------- Forwarded message ----------
> > From: mdipierro <mdipie...@cs.depaul.edu>
> > Date: Sep 23 2010, 2:34 pm
> > Subject: web2py basic auth
> > To: web2py-users
> >
> > Against trunk please. It is ok if you just send me a replacement file.
> > I will diff and study it.
> >
> > On Sep 23, 8:52 am, Niphlod <niph...@gmail.com> wrote:
> >
> > > Never done a patch before, but I think in the night (here are 3PM) I
> > > can manage to have a first draft.
> >
> > > I'd have to test it out, but for the beginning .. What wuold be the
> > > patch against ? tools.py in trunk or tools.py in 1.85.3?
> >
> > > On 23 Set, 14:52, mdipierro <mdipie...@cs.depaul.edu> wrote:
> >
> > > > You are right. That would be best. Want to send me a patch?
> >
> > > > On Sep 23, 2:26 am, Niphlod <niph...@gmail.com> wrote:
> >
> >
>

Reply via email to