// Prepare to create the authenticators and authorizers ...
AuthenticationProviders authenticators = new AuthenticationProviders();
Security securityConfig = config.getSecurity();
// Set up the JAAS providers ...
JaasSecurity jaasSecurity = securityConfig.getJaas();
if (jaasSecurity != null) {
String policyName = jaasSecurity.getPolicyName();
if (policyName != null && policyName.trim().length() != 0) {
try {
JaasProvider jaasProvider = new JaasProvider(policyName);
authenticators = authenticators.with(jaasProvider);
} catch (java.lang.SecurityException e) {