On Tue, Nov 18, 2008 at 9:51 AM, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 18, 2008 at 9:30 AM, Gustavo Narea <[EMAIL PROTECTED]> wrote:
>>
>> Hello.
>>
>> On Tuesday November 18, 2008 15:29:10 Jorge Vargas wrote:
>>> > Indeed that's a good reminder: That package is now part of the Repoze
>>> > project and its new name is "repoze.what":
>>> > http://groups.google.com/group/turbogears-
>>> > trunk/browse_thread/thread/a0cf48cb5c7b977
>>>
>>> how about the tracker? shall we use tg?
>>
>> I think it's better to use Repoze's: http://bugs.repoze.org/
>>
> ok umm, I haven't seen roundup in a while.
>>
>>> > When you upgrade to the second beta (or the latest revision in trunk),
>>> > you'll have to replace "tgext.authorization" with "repoze.what". It's
>>> > absolutely compatible with the former tgext.authorization, so it's safe
>>> > to do a bulk find & replace.
>>>
>>> One thing I'm still puzzled about is the quickstart code for auth,
>>> it's missing the controller for /login_handler, what should go in
>>> there to make autentication work?
>>
>> Nothing, it should work out-of-the-box. repoze.who's RedirectingFormPlugin
>> handles that URL:
>> http://static.repoze.org/whodocs/#repoze.who.plugins.form.RedirectingFormPlugin
>>
> I though so as I wasn't getting any error message
>
>> You may use the code below to verify that indeed authentication worked:
>>>     def index(self):
>>>         from tg import request
>>>         identity = request.environ.get('repoze.who.identity')
>>>         if identity and 'repoze.who.userid' in identity:
>>>             flash('Hello, %s!' % identity['repoze.who.userid'])
>>>         else:
>>>             flash('not authenticated')
>>>         return dict(page='index')
>>
> awesome that is what I needed.
>
> I just ran this and I'm getting 'not autenticated' I checked the SA
> logs and it is returning the correct Row so it seems to be working
> fine on the backend.

as this is returning None

it seems there is something wrong with my setup
   @expose('projectone.webapp.templates.index')
    def index(self):
        from tg import request
        identity = request.environ.get('repoze.who.identity')
        return str(identity)

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