Obtaining a reference to the current users {{[UserTicket|http://www.flexive.org/docs/javadoc/shared/index.html?com/flexive/shared/security/UserTicket.html]}} is simple: It is stored in a ThreadLocal and accessible using the {fx} context {{[FxContext|http://www.flexive.org/docs/javadoc/shared/index.html?com/flexive/shared/FxContext.html]}}:
{code:java}
UserTicket ticket = FxContext.get().getTicket();
{code}
There is also a shortcut version available:
{code:java}
UserTicket ticket = FxContext.getUserTicket();
{code}
For more information about the {{UserTicket}} and security see the [Reference Documentation|http://www.flexive.org/docs/website/core_security.html]
Site running on a free Atlassian Confluence Open Source Project License granted to [fleXive] . Evaluate Confluence today.