Hi rizalvi
there are basically 3 ways to write a Lithium cookie.
- use Lithium library to create the cookie object and write the cookie object to response.
- use Lithium library to create the cookie object, but write the cookie object to response yourself.
- use Lithium library to generate the cookie content, but create the cookie object yourself and write the cookie object to response yourself
for the first way, this could be some sample code for you
// init SSOClient class (to be called during server init, 1 time only)
String keyPath = "C:\\usr\\local\\www\\web-inf\\lithium\\companyx.key";
SSOClient.init(keyPath, "companyx", ".companyx.com");
.......
.......
String uniqueId = "167865";
// display name
String login = "janmon04";
String email = "jane.monet@mycompany.com";
Hashtable settingsMap = new Hashtable();
settingsMap.Add("profile.name_first", "Jane");
settingsMap.Add("profile.name_last", "Monet");
//write cookie
//request and response should be your content value
SSOClient.writeLithiumCookie(uniqueId, login, email, settingsMap, request, response);