Commit Graph

8 Commits

Author SHA1 Message Date
tao.takashi
810e3d641e added distinction for plain and md5 credentials by adding a type attribute and making the deserializer notice the right fields in the credential LLSD string.
This is not the best solution though, better would be if the credential LLSD would contain a field saying
what sort of credential it is instead that we need to test for md5-password or password occurrence.
2008-09-03 22:50:19 +00:00
tao.takashi
69e020398f implemented MD5PasswordCredential, the serializer and extended the deserializer to dispatch between a PlainPasswordCredential and an MD5PasswordCredential. Documentation on this is in the doctest in tests/credential.txt 2008-08-10 16:11:51 +00:00
tao.takashi
67bcfb4b1b added deserializer for credentials plus a test for it (and the serializer as well). Also cleaned up unused interfaces. 2008-07-27 19:54:54 +00:00
tao.takashi
03f309b012 merged trunk mrtopf-networking to trunk, grokified it, fixed a bug when not finding a serializer and added a test for it. Capabilities now also have a POST method for POSTing data to them. GET, etc. is pending. 2008-07-24 19:25:02 +00:00
tao.takashi
c3528af70e merged branch mrtopf-grokified into trunk. For making it work I resolved some obvious conflicts and changed the message parser classes to new style classes. 2008-07-23 20:03:40 +00:00
tao.takashi
df7c4739f0 added doctests for the dict serializer/deserializer and the credential serializer, both using ISerialization. 2008-07-19 14:34:41 +00:00
tao.takashi
63a0469cdc refactored serialization handling in capabilities and credentials.
It all goes via one interface ISerialization which has a serialize() method which serializes the context into whatever output format and it has a content_type attribute which defines the content type of the output (default is LLSD).

There is a ISerialization adapter configured for both capabilities (from dicts) and PlainPasswordCredentials. See agentdomain.py for how to use it.

For deserialization there is a IDeserialization utility now. It is registered under the name of the content type it can deserialize. It produces dicts always. Use it like this:

deserializer = getUtility(IDeserialization,name="application/llsd-xml")
dict = deserializer.deserialize_string(s)

Tests for this component will be added later but they are indirectly tested by the login test which passes.
2008-07-19 14:21:18 +00:00
locklainn.linden
5bb135727d 2008-06-27 15:10:24 +00:00