Hello,
I've just fixed the bug. Can you please try with the latest revision in
TurboGears 2 trunk? For more info on how to install it, please check:
http://turbogears.org/2.0/docs/main/Contributing.html
HTH.
- Gustavo.
On Sunday January 18, 2009 14:53:42 drakkan wrote:
> Hi Gustavo,
>
> thanks for your answer, I want to have basic authentication only, soI
> added in config/app_cfg.py the following:
>
> from repoze.who.plugins.basicauth import BasicAuthPlugin
> http_auth = BasicAuthPlugin('testrealm')
>
> and in the same file I replaced
>
> base_config.sa_auth.form_plugin = None
> with
>
> base_config.sa_auth.form_plugin = http_auth
>
> however there is yet something wrong, using paster serve I see:
>
> [auth] identifier plugins registered [<BasicAuthPlugin 177563788>,
> <AuthTktCookiePlugin 178156396>]
>
> so seems both plugins are registered and the login form is not
> replaced with HTTP authentication
>
> On 18 Gen, 13:05, Gustavo Narea <[email protected]> wrote:
> > Hello,
> >
> > On Sunday January 18, 2009 10:51:03 drakkan wrote:
> > > I would like to use http auth with turbogears2 instead of the default
> > > auth, so I would like to use only http auth
> > >
> > > I looked at:
> > >
> > >http://www.turbogears.org/2.0/docs/main/Auth/Customization.html
> > >
> > > but I'm yet not able to use http auth.
> > >
> > > Can someone give some more detailed directions?
> > >
> > > for example
> > >
> > > "ou may use something like this in {yourproject}.config" config is a
> > > directory maybe the documentation mean {yourproject}.config.app_cfg?
> >
> > I'm sorry, that part of the documentation is wrong, but I fixed it in
> > trunk some days ago so it'll get updated soon.
> >
> > > when I set:
> > >
> > > "app_cfg.sa_auth.authenticators = [('http_auth', http_auth)]"
> > >
> > > I have the error:
> > >
> > > ValueError: http_auth: An object has failed to implement interface
> > > <InterfaceClass repoze.who.interfaces.IAuthenticator>
> > >
> > > The authenticate attribute was not provided.
> >
> > Right, that's because BasicAuthPlugin is a repoze.who identifier and
> > challenger, not an authenticator (that's the mistake I've fixed). Try
> > this instead:
> >
> > app_cfg.sa_auth.form_plugin = http_auth
> >
> > That will replace the default login form with HTTP authentication. But if
> > you just want to add HTTP authentication as a *secondary* authentication
> > method, then use this line:
> >
> > app_cfg.sa_auth.identifiers = [('http_auth', http_auth)]
> > app_cfg.sa_auth.challengers = [('http_auth', http_auth)]
> >
> > HTH.
> > --
> > Gustavo Narea.
> > General Secretary.
> > GNU/Linux Matters <http://gnulinuxmatters.org/>.
>
>
--
Gustavo Narea.
General Secretary.
GNU/Linux Matters <http://gnulinuxmatters.org/>.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---