Thanks Alessandro.  I had actually started out with FriendlyForm and 
thought incorrectly that FastForm might be the solution.  Here's the real 
problem...

In the default post_login handler in root.py, the check for whether 
authentication worked is:

        if not request.identity:
             redirect('/login'...

but although the LDAP authentication appears to succeed, "request.identity" 
is still None, and the user is redirected back to the login form.  What's 
the right thing to test if the user successfully authenticated?

Note that there is a version clash between TG2.3 beta and the repoze LDAP 
plugin, which wants repoze.who >= 1.0.6, < 2.0dev (I changed its 
requires.txt to "repoze.who >= 1.0.6", ignoring the consequences). Also, 
FriendlyForm requires installing Paste, which I believe has mostly been 
replaced.  I'm not sure if either of these is contributing to my problem.

Matthew





On Friday, June 7, 2013 6:29:21 PM UTC-4, Alessandro Molina wrote:
>
> FastForm by itself is meant to be an internal tool used by TurboGears to 
> setup the default auth support on both Py2 and Py3. 
> As you are currently using Py2.6 you can continue to use the FriendlyForm 
> plugin, it should work as before. 
> TG by itself is still compatible with FriendlyForm and since you are using 
> who.ini based configuration you are actually skipping the TurboGears auth 
> setup available since 2.2.
>
>
> On Fri, Jun 7, 2013 at 7:43 PM, MHCPU <[email protected] 
> <javascript:>>wrote:
>
>> Hi, I have LDAP authentication working in TG 2.2, and am trying to get it 
>> working in 2.3 beta.  It seems as though one difference between 2.2 and 2.3 
>> is the switch from FriendlyForm to FastForm.  So I've modified my who.ini 
>> as follows:
>>
>> 2.2 (works)...
>>
>> [plugin:friendlyform]
>> use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
>>
>> 2.3 (fails)...
>>
>> [plugin:form]
>> use = tg.configuration.auth.fastform:FastFormPlugin
>>
>> This fails to find fastform (traceback is below).  Is "[plugin:form]" 
>> correct?  Do I need to import fastform somewhere?
>>
>> Any help appreciated.
>>
>> -- Matthew
>>
>> gearbox serve --debug
>> 13:40:25,822 ERROR [gearbox] Failed to load application or server: No 
>> module named fastform (--debug to see traceback)
>> Traceback (most recent call last):
>>   File "/home/mcahn/grading2/bin/gearbox", line 8, in <module>
>>     load_entry_point('gearbox==0.0.2', 'console_scripts', 'gearbox')()
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/gearbox/main.py", line 
>> 71, in main
>>     return gearbox.run(args)
>>   File "/home/mcahn/grading2/lib/python2.6/site-packages/cliff/app.py", 
>> line 191, in run
>>     result = self.run_subcommand(remainder)
>>   File "/home/mcahn/grading2/lib/python2.6/site-packages/cliff/app.py", 
>> line 249, in run_subcommand
>>     result = cmd.run(parsed_args)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/cliff/command.py", line 
>> 49, in run
>>     self.take_action(parsed_args)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/gearbox/commands/serve.py",
>>  
>> line 257, in take_action
>>     relative_to=base, global_conf=parsed_vars)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/gearbox/commands/serve.py",
>>  
>> line 288, in loadapp
>>     return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", 
>> line 247, in loadapp
>>     return loadobj(APP, uri, name=name, **kw)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", 
>> line 272, in loadobj
>>     return context.create()
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", 
>> line 710, in create
>>     return self.object_type.invoke(self)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/paste/deploy/loadwsgi.py", 
>> line 146, in invoke
>>     return fix_call(context.object, context.global_conf, 
>> **context.local_conf)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/paste/deploy/util.py", 
>> line 56, in fix_call
>>     val = callable(*args, **kw)
>>   File "/home/mcahn/grading2/grading/grading/config/middleware.py", line 
>> 45, in make_app
>>     app_conf['who.log_level'])
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 191, in make_middleware_with_config
>>     parser.parse(f)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 110, in parse
>>     IIdentifier,
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 61, in _parsePluginSequence
>>     plugin = self._getPlugin(plugin_name, iface)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 48, in _getPlugin
>>     obj = self._makePlugin(name, iface)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 40, in _makePlugin
>>     obj = _resolve(name)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/repoze/who/config.py", 
>> line 23, in _resolve
>>     return EntryPoint.parse('x=%s' % name).load(False)
>>   File 
>> "/home/mcahn/grading2/lib/python2.6/site-packages/pkg_resources.py", line 
>> 2060, in load
>>     entry = __import__(self.module_name, globals(),globals(), 
>> ['__name__'])
>> ImportError: No module named fastform
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TurboGears" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/turbogears?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to