// Now set the security context, which can be used in EJB or other calls
if (samlCredential != null)
{
SecurityClient client = SecurityClientFactory.getSecurityClient();
// Simple login just updates the security context
client.setSimple(new UserPrincipal(httpRequest.getRemoteUser()), samlCredential);
client.login();
if (log.isTraceEnabled())
{
log.trace("SecurityClient successfully updated with SAMLCredential");