On 10 January 2013 12:00, Marco Giusti <marco.giu...@gmail.com> wrote: [snip] >> My AvatarID Object is just for data. >> >> Let me describe one of my usage/requirement: >> >> I have a portal with credentialsChecker for both OS accounts and >> application specific accounts. >> One can have user "john" both as a local account and/or an application >> account. >> If my credentialsChecker returns only 'john', the Realm will not know >> from where to get user's home folder, so the returned AvatarID needs >> to signal the "source" of avatarID login so that it can use the same >> source for getting account configuration. > > Can't you use `Portal.login` interfaces paramenter? I think you have two > different entry points for local and application accounts, so:
I can not do portal.login('john', None, ILocalHomeFolder) since at log in time I don't know if john is an os or application account... The credential checker will find out what kind of account is John. [snip] > well actually tuples are not modifiable, so they are strings, then > ('john', 'os') is an unique identifier across all system with no much > more information than 'john@os'. The advantage of using plain string is > that they don't break the interface. Later I would like to extract the provider from the AvatatID and doing (user, provider) = AvatarID.split('@', 2) is a bit more complicated and error prone. Thanks for the notes. Cheers -- Adi Roiban _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python