Perhaps someone who knows more about the core will chime in.

Failing that, maybe this will put you on the scent ...

In db.py there should be a line something like auth=Auth(db), which
comes after
'from gluon.tools import ... auth ..

So the Auth class is in gluon/tools.py.

Auth contains the login methods.  Looking at one named 'basic' I see
it
returns False on login failure.

Where the call to 'basic' originates I do not know, but I suspect the
caller handles the redirection and flash messaging.

You might be able to find the caller by grepping for the text of the
failed login message.

You have investigated response.flash, right?



On Nov 8, 9:09 pm, Matt Broadstone <[email protected]> wrote:
> When I looked at how the generated sample app handled showing that
> there was an error with logging in, it showed the message in a flash
> area in the view. To be clear here: the controller is a two-liner:
>
> def user():
>    return dict(form=auth())
>
> so there is no setup in the controller, as it relates to flash at
> least. This lead me to believe that whatever is going on in the
> creation of the auth form, it places errors into the session.flash
> variable, and I figured I could just add that to my view and the error
> would show up. This was not the case.
>
> What I'm really asking here is how to access that error information.
> It doesn't appear in session.flash, it doesn't appear in form.errors.
>
> Matt
>
>
>
>
>
>
>
> On Tue, Nov 8, 2011 at 5:08 PM, Cliff <[email protected]> wrote:
> > Is there a div with the id of 'flash' in your view?
>
> > On Nov 8, 11:14 am, Matt <[email protected]> wrote:
> >> Greetings,
> >> We are currently experiencing an issue with invalid logins not showing
> >> errors. For auth we are using a combination of basic auth and PAM, and
> >> the actual controller/view combo for the login form is basically the
> >> same as the generated scaffolding. When an invalid username/password
> >> is entered the page simply reloads without any indication of what the
> >> error was. I tried to display the flash (we are not currently using
> >> the session flash, so this had to be added to this page) and that has
> >> no info in it, I have also tried to display auth.login_form()'s
> >> errors, which do not exist either. Is there some way to get this
> >> information?
>
> >> Thank you,
> >> Matt

Reply via email to