public UMOSecurityContext create(UMOAuthentication authentication) { SecurityContext context = new SecurityContextImpl(); context.setAuthentication(((AcegiAuthenticationAdapter) authentication).getDelegate()); if (authentication.getProperties() != null) { if ((authentication.getProperties().containsKey("securityMode"))) { SecurityContextHolder.setStrategyName( (String) authentication.getProperties().get("securityMode")); } } SecurityContextHolder.setContext(context); return new AcegiSecurityContext(context); }