On 15.12.2010 10:58, Grégory Joseph wrote:
There's something very close to what you need (if not exactly) in the
openid-module. Have a look at info.magnolia.module.openid.frontend.LoginModel.
I've tried to implement this in a form processor:
---------------------------------
protected void internalProcess(final Content content, final Map<String,
Object> parameters){
// external user lookup
final UserAccount userAccount =
MyManagerFactory.getInstance().getMyUserManager().login(getUsername(),
getPassword());
// conversion to a "fake" magnolia user
final User mgnlUser = new My2MgnlUser(userAccount);
final LoginResult loginResult = new
LoginResult(LoginResult.STATUS_SUCCEEDED, mgnlUser);
LoginResult.setCurrentLoginResult(loginResult);
}
This is running on a public instance, without cache..
The form processor is "correct" because the mgnlUser is instanciated,
but the user does not authenticate in Magnolia on following renderings..
Into the main.ftl I placed this line:
<p>DEBUG: currentUser = ${ctx.user.name!"-"}</p>
and the output is:
DEBUG: currentUser = anonymous
??? Any idea?
Thanks for helping..
Matteo
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------