<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Jakub,<br>
<br>
I was struggling in the same problem. <br>
You can use the method switchUser(CmsObject cms,
HttpServletRequest req, CmsUser user) on CmsSessionManager (but
the user must be a Workplace user).<br>
<br>
Otherwise you can set userid and password in a session variable,
get the values from the session and then use the loginUser method.<br>
I hope this is useful for you.<br>
Kind regards<br>
<br>
Antonio Cordeddu<br>
<br>
<br>
<br>
On 21/07/2013 9.47, Jakub Ječmínek wrote:<br>
</div>
<blockquote
cite="mid:CABO=eT0VV7dhVowaQOsvgPztJdDGiQn0z11KuAuO6b+Kr2F_YA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,<br>
<div dir="ltr">
<div>I'm trying to develope a "remember me" functionality to
OpenCms based on cookies and the best practices described
here <a moz-do-not-send="true"
href="http://jaspan.com/improved_persistent_login_cookie_best_practice">http://jaspan.com/improved_persistent_login_cookie_best_practice</a>. </div>
<div>Only problem that I have is that I don't know how to
login user programatically after it was verified that his
cookie is valid. I know that there is method </div>
<div>loginUser(java.lang.String username, java.lang.String
password) on CmsObject. But this requires knowledge of
user's password and I don't want to store user's password in
the cookie for security reasons, not even if it was hashed.
Is there any other way how to login user programatically? Or
has anybody tried to create this functionality in the
OpenCms?</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div>Jakub Ječmínek<br>
------------------------------------------------<br>
NELASOFT Technologies, s.r.o.<br>
Mob: +420 604 575 772<br>
E-mail: <a moz-do-not-send="true"
href="mailto:jakub.jecminek@nelasoft.cz" target="_blank">jakub.jecminek@nelasoft.cz</a><br>
Web: <a moz-do-not-send="true"
href="http://www.nelasoft.cz/" target="_blank">www.nelasoft.cz</a><br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
_______________________________________
Coranto informatica di Antonio Cordeddu
Via Torricelli, 9 09047 Selargius (CA)
<a class="moz-txt-link-abbreviated" href="mailto:antoniocordeddu@coranto.it">antoniocordeddu@coranto.it</a>
Skype: antonio.cordeddu
<a class="moz-txt-link-freetext" href="http://www.coranto.it">http://www.coranto.it</a>
___________________________________________</pre>
</body>
</html>