webticket: implement caching
commit8de33e06f38cb241cd3fc47f9576c2b3ca6c69a8
authorStefan Becker <chemobejk@gmail.com>
Tue, 20 Nov 2012 13:50:57 +0000 (20 15:50 +0200)
committerStefan Becker <chemobejk@gmail.com>
Wed, 21 Nov 2012 15:45:32 +0000 (21 17:45 +0200)
tree2aa11a5d3ff0235eaa2c5b2de848a15de8ff531b
parentea20af3292e57ee91ce1ea935e1f164f64c9035e
webticket: implement caching

Once we have generated a wsse_security string for a Service URI we store
it and its Authentication URI in a hash table. If another request for
the same URI is made then we simply use the stored token instead of
requesting a new one. This will speed up all operations that depend on
Web Tickets.

NOTE: callers of sipe_webticket_request() must be prepared that the
      callback is called immediately from inside that function, i.e. the
      callback data must be properly initialized already.

TODO: add expiration timestamp for tokens to cache.
src/core/sipe-core-private.h
src/core/sipe-core.c
src/core/sipe-webticket.c
src/core/sipe-webticket.h