Hi,
I'm trying to identicate automatically an user with a string token in an
url.
Example : www.toto.fr/mypage/mytoken
I'm trying to do this using the setupRender of myPage by doing this :
public void setContext(String tokenKey) {
UserDetails ud = loadUserByUsername(tokenKey);
UsernamePasswordAuthenticationToken result = new
UsernamePasswordAuthenticationToken (
ud,
null,
ud.getAuthorities());
SecurityContextImpl sc = new SecurityContextImpl();
sc.setAuthentication(result);
SecurityContextHolder.clearContext();
SecurityContextHolder.setContext(sc);
}
It seems to not works properly.
Did someone already try to do this ?
Is this the good way ?
Thanks for any help, Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org