Op 12-02-11 01:59, Andrea Brugiolo schreef:
I am writing an authentication plugin against a web service that is a
back end for my Plone site. I am following this example
http://plone.org/documentation/kb/simple-plonepas-example and looking
at the PluggableAuthService plugins code.

It is almost working.

The fact is I need also a "namespace" input in the login form; I
implemented it in the login form but I can't understand how to get its
value into the 'credentials' parameter my plugin's
authenticateCredentials method will look at and parse.

I have implemented also the IExtractionPlugin interface in order to
include the namespace in credentials but I didn't get the effect I
want and I'm not sure of what I am doing.

I feel I am close to the answer but I can't figure it out completely.

Any suggestions?

Thanks in advance!

Andrea

I at least know that Plone does something like this (pseudo code):

for ext in ExtractionPlugins:
    credentials = ext.get_credentials()
    for auth in AuthenticationPlugins:
        auth.check_credentials(credentials)
        if authentication worked:
            print 'wooohoo'
            return

So if your namespace does not end up in the credentials, it may just be that your extraction plugin has not actually been called (yet).


I have recently released this PAS plugin that also has extraction and authentication; maybe its code has some hints for you:
http://pypi.python.org/pypi/pas.plugins.aselect
(also on the collective)

Cheers,

--
Maurits van Rees
Web App Programmer at Zest Software: http://zestsoftware.nl
Personal website: http://maurits.vanrees.org/

_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/product-developers

Reply via email to