I want to authenticate the CQ user through cookie, means the user credentials are stored in user browser(cookie), which would be auto read and auto authenticated in CQ.
Thanks for the quick feedback, the requirement is a bit different:
We've uploaded the custom users to the CRX /home/user directory with all the profile data. The user node is created with an id like "123456'' with some dummy password.
An anonymous user opens the website (having this user id in a Cookie), now we want to auto authenticate this particular user so that the authorizableId (property in SessionPersistence Cookie) gets updated as "123456' rather as anonymous. So that the user falls in the proper segment and the marked teaser is rendered to him/her.
I am not sure i am following you - you want an anonymous user to login (the Cookie is updated with this Id) -- but you want props of the cookie updated with "123456"?