Thanks for the patch, but I think google groups strips attachments.
If there's a ticket already, please add this there, if not please open up a
ticket for this issue, and attach the patch there.

--Mark Ramm

On Tue, Dec 23, 2008 at 10:36 PM, Lukasz Szybalski <[email protected]>wrote:

>
> > 3.  print devtools.__file__
> >
> /usr/local/pythonenv/BASELINE6/lib/python2.5/site-packages/tg.devtools-2.0b1dev_r5976-py2.5.egg/devtools/__init__.pyc
> >
> > When using modwsgi I set the script name like this:
> > WSGIScriptAlias /mainweb /path/to/myapp/mainweb.wsgi
> >
> > What above does is set script_name for tg2 app.
> > script_name = /mainweb
> >
> > This script name is not used after I click "login" or "logout"
> > http://localhost/mainweb/login
> > I fill in user:pass and when I click login, I am redirected to:
> > http://localhost/
> > instead I should be redirected to
> > http://localhost/mainweb/
> >
> > Similar situation happens on logout:
> > http://localhost/login?came_from=http%3A%2F%2Flocalhost%2Fmainweb%2F
> > instead of
> >
> http://localhost/mainweb/login?came_from=http%3A%2F%2Flocalhost%2Fmainweb%2F
> >
> > If you could tell me which part of the tg2 quick started app this
> > happens in then maybe I can fix it or point you to exactly where it
> > fails.
> >
> >
>
> I've attached the patch for login redirection.
>
> Logout redirection is still unknown to me. Can somebody explain where
> /logout_handler is and what is doing so I can look at the code, or
> tell me what this section is doing. Somewhere in here the
> /logout_handler is not tg.url()ed.
>
> 21:31:30,354 INFO  [auth] -- repoze.who request started (/logout_handler)
> --
> 21:31:30,354 INFO  [auth] request classification: browser
> 21:31:30,354 INFO  [auth] identifier plugins registered
> [<RedirectingFormPlugin 32665936>, <AuthTktCookiePlugin 32343120>]
> 21:31:30,355 INFO  [auth] identifier plugins matched for
> classification "browser": [<RedirectingFormPlugin 32665936>,
> <AuthTktCookiePlugin 32343120>]
> 21:31:30,356 INFO  [auth] authenticator plugins registered
> [<repoze.who.plugins.sa.SQLAlchemyAuthenticatorPlugin object at
> 0x1ed8410>]
> 21:31:30,356 INFO  [auth] authenticator plugins matched for
> classification "browser":
> [<repoze.who.plugins.sa.SQLAlchemyAuthenticatorPlugin object at
> 0x1ed8410>]
> 21:31:30,356 INFO  [auth] userid preauthenticated by
> <AuthTktCookiePlugin 32343120>: "manager" (repoze.who.userid set)
> 21:31:30,358 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] BEGIN
> 21:31:30,360 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] SELECT
> tg_user.password AS tg_user_password, tg_user.user_id AS
> tg_user_user_id, tg_user.user_name AS tg_user_user_name,
> tg_user.email_address AS tg_user_email_address, tg_user.display_name
> AS tg_user_display_name, tg_user.created AS tg_user_created
> FROM tg_user
> WHERE tg_user.user_name = ?
>  LIMIT 2 OFFSET 0
> 21:31:30,361 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] [u'manager']
> 21:31:30,366 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] SELECT
> tg_group.group_id AS tg_group_group_id, tg_group.group_name AS
> tg_group_group_name, tg_group.display_name AS tg_group_display_name,
> tg_group.created AS tg_group_created
> FROM tg_group, tg_user_group
> WHERE ? = tg_user_group.user_id AND tg_group.group_id =
> tg_user_group.group_id
> 21:31:30,367 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] [1]
> 21:31:30,371 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] SELECT
> tg_group.group_id AS tg_group_group_id, tg_group.group_name AS
> tg_group_group_name, tg_group.display_name AS tg_group_display_name,
> tg_group.created AS tg_group_created
> FROM tg_group
> WHERE tg_group.group_name = ?
>  LIMIT 2 OFFSET 0
> 21:31:30,371 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] [u'managers']
> 21:31:30,375 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] SELECT
> tg_permission.permission_id AS tg_permission_permission_id,
> tg_permission.permission_name AS tg_permission_permission_name,
> tg_permission.description AS tg_permission_description
> FROM tg_permission, tg_group_permission
> WHERE ? = tg_group_permission.group_id AND tg_permission.permission_id
> = tg_group_permission.permission_id
> 21:31:30,375 INFO  [sqlalchemy.engine.base.Engine.0x...2b10] [1]
> 21:31:30,377 INFO  [auth] User belongs to the following groups:
> (u'managers',)
> 21:31:30,377 INFO  [auth] User has the following permissions: (u'manage',)
> 21:31:30,377 INFO  [auth] static downstream application replaced with
> 401 Unauthorized
> This server could not verify that you are authorized to
> access the document you requested.  Either you supplied the
> wrong credentials (e.g., bad password), or your browser
> does not understand how to supply the credentials required.
>
>
>
> 21:31:30,378 INFO  [auth] challenge required
> 21:31:30,378 INFO  [auth] forgetting via headers from
> <AuthTktCookiePlugin 32343120>: [('Set-Cookie', 'authtkt=""; Path=/'),
> ('Set-Cookie', 'authtkt=""; Path=/; Domain=localhost:8080'),
> ('Set-Cookie', 'authtkt=""; Path=/; Domain=.localhost:8080')]
> 21:31:30,378 INFO  [auth] challengers registered:
> [<RedirectingFormPlugin 32665936>]
> 21:31:30,379 INFO  [auth] challengers matched for classification
> "browser": [<RedirectingFormPlugin 32665936>]
> 21:31:30,379 INFO  [auth] challenger plugin <RedirectingFormPlugin
> 32665936> "challenge" returned an app
> 21:31:30,379 INFO  [auth] executing challenge app
> 21:31:30,381 INFO  [auth] -- repoze.who request ended (/logout_handler) --
> 21:31:30,390 INFO  [auth] -- repoze.who request started (/login) --
> 21:31:30,390 INFO  [auth] request classification: browser
> 21:31:30,390 INFO  [auth] identifier plugins registered
> [<RedirectingFormPlugin 32665936>, <AuthTktCookiePlugin 32343120>]
> 21:31:30,391 INFO  [auth] identifier plugins matched for
> classification "browser": [<RedirectingFormPlugin 32665936>,
> <AuthTktCookiePlugin 32343120>]
> 21:31:30,391 INFO  [auth] no identities found, not authenticating
> 21:31:30,420 INFO  [auth] no challenge required
> 21:31:30,421 INFO  [auth] -- repoze.who request ended (/login) --
>
>
> Thanks,
> Lucas
>
> >
>


-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
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