On Mon, Feb 23, 2009 at 6:45 PM, Gustavo Narea <[email protected]> wrote:

> So, as I've already said, as your application evolves and your authentication
> method changes, you would just have to update the three tests above -- *not*
> every single test that covers a protected area.
>
> Finally, this is how I'll implement this:
>  1.- I have a repoze.who plugin which acts as identifier and challenger to
> make the tests above possible.
>  2.- I'll make repoze.what-quickstart use it, replacing the default form
> plugin, when we're asked to skip authentication.
>
> Now, I can integrate this functionality nicely in TG2 if you accept it. The
> implementation would be simple and backwards compatible:
>  1.- We'd have to add one line to test.ini (under [DEFAULT]), in the
> quickstart template:
>    skip_authentication = True
>  2.- Next, pass the value of this variable, if defined, to repoze.what-
> quickstart. Specifically, I'd have to pass its value as an argument to
> tg.configuration:AppConfig.add_auth_middleware(), which will pass it to
> repoze.what.plugins.quickstart:setup_sql_auth().

Nice post.

I would like two things:

  - first: give a lot of comments in the test.ini file on what this
variable really means, or we'll get everyone asking in the ML what is
does and should it be removed.
  - second: provide testing of quickstart protected zones in the
quickstart+ auth test to prove to the simple user the challenge for
protected protected controllers indeed exists (the last example you
gave about test_forced_login and stuff)

And... Gustavo, thanks for the hard work you're putting in TG2 those days.

One more thing :)

Last time I tried to implement a auth test i wrote what you did in the
forced_login example. But when I tried login_handler.follow() it
refused to give me access to the resource because the cookie had not
been set in my test browser (not even sent back). Did you change
something to make that work? This is not quite important as long as it
works now. I may have overlooked a stupid implementation fault
somewhere in my test... Just out of curiosity.

Florent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to