Hi all, I am started to work on the $subject. These utility functions can be directly used in script based conditional authentication as javascript methods. Underline implementation will be writen on java in the backend. We have identified following cookie related functions,
- setCookie(context/response, name, value, [optional] properties) Sets a cookie named ‘name’ with the value as ‘value’. ‘Properties’ is an optional map that may contain optional attributes such as validityPeriod, path, secure, httpOnly - setEncryptedCookie(context/response, name, value, [optional] properties) Similar to ‘setCookie()’. But the value will be enrypted. - setSignedCookie(context/response, name, value, [optional] properties) Similar to ‘setCookie()’. But the value will be signed. - getCookieValue(context/response, name) Get the plan text cookie value for cookie ‘name’ if present. - getSignedCookieValue(context/response, name) Get the signed cookie value for cookie ‘name’ if present with a valid signature. - getEncryptedCookieValue(context/response, name) Get the encypyed cookie value for cookie ‘name’ if present with valid encrypted data. We have done a POC for the first function. We have used the following JS method signature, setCookie(response, "name", "value", {"max-age" : 4000, "path" : "/localhost", "domain" : "localhost", "httpOnly" : true, "secure" : true, "version" : 1, "comment" : "some comments" }); if anyone didn't want the propeties, they can use {} or null. Your comments and feedback related to these identified functions and signature are highly appreciated. thanks, Senthalan. -- *Senthalan Kanagalingam* *Software Engineer - WSO2 Inc.* *Mobile : +94 (0) 77 18 77 466* <http://wso2.com/signature>
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture