[Zope] python script containing userid and ip address help

Dean Hale dean.hale at sunderland.ac.uk
Wed Oct 27 09:46:55 EDT 2004


Hi

We are attempting to create a python script using md5 to enable SSO 
between our systems.

We have a simple python script

import md5
key_string = "UIDPassPhraseIPno"
print md5.new( key_string ).hexdigest()

which returns

1bee32f99b3f6adba13c450024ab126f

However we need three fields to be pulled automatically once the user 
logs in

UID
PassPhrase (for example onceuponatime)
IP number

currently using LDAPUserFolder as the authentication source

I've figured out these

uid python:member.getProperty('uid'); ip request/REMOTE_ADDR which we 
use in portlets etc but not sure how to use them within the script above.

we can use links manually as below, however we have 1000's of users and 
i haven't a clue how to achieve above within python.

<a 
href="http://url?action=sso:portal&amp;userid=myid&amp;session=804ab421d396cf8465b9b78e9550d493">Dean's 
test from his pc</a>

Currently using LDAPUserFolder, Plone 2, Zope27 on SUSE.

Probably as clear as mud, but any advice appreciated.

thanks
dean



More information about the Zope mailing list