the way i understand it works is:

after
 request.environ['paste.auth_tkt.set_user'](username)
you need to redirect to some page

after that you'd have access to REMOTE_USER


On Jun 13, 4:08 pm, voltron <[EMAIL PROTECTED]> wrote:
> On last try, I can get this to work now in my controller:
>
> # test
> username = "voltron"
> request.environ['paste.auth_tkt.set_user'](username)
> c.env1 = request.environ['REMOTE_USER']
>
> when I try to output c.env1 in my template, i get a traceback
>
> exceptions.KeyError: 'REMOTE_USER'
>
> I can feel it, almost there, somebodys just got to pull the scales
> from my eyes
>
> On Jun 14, 1:00 am, voltron <[EMAIL PROTECTED]> wrote:
>
> > I apologize, I am a dork, I was so near to trashing my computer, I
> > added this to my middleware.py
>
> > import authkit.authenticate
> > app = authkit.authenticate.middleware(app, config_paste=app_conf,
> > signin='/account/signin')
>
> > Have you done the same too, I got this from the tutorial I posted
> > earlier on, I wonder if this is the right way to do this since there
> > are two approches, setting signin in the ini or direct in the
> > middleware
>
> > thanks for your patience
>
> > On Jun 14, 12:52 am, ben adam <[EMAIL PROTECTED]> wrote:
>
> > > Are your settings like I mentioned earlier? Specifically do you have
> > > the following:
> > > authkit.enable = true
>
> > > On Jun 13, 3:42 pm, voltron <[EMAIL PROTECTED]> wrote:
>
> > > > I wonder, does the REMOTE _USER get created first when there is a 403
> > > > or 401?
>
> > > > I tried to test
> > > > class TestController(BaseController):
>
> > > >     def index(self):
> > > >         if request.environ.has_key('REMOTE_USER'):
> > > >             print "wwww"
>
> > > >         request.environ['paste.auth_tkt.set_user'](username)
>
> > > > and I get this traceback promptly
>
> > > > request.environ['paste.auth_tkt.set_user'](username)
> > > > exceptions.KeyError: 'paste.auth_tkt.set_user'
>
> > > > it just does not exist


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to