securityHandler.setRealmName("brcm-accounts-api");
final Authenticator authenticator = new WesabeAuthenticator(securityHandler);
securityHandler.setAuthenticator(authenticator);
final Constraint requireAuthentication = new Constraint();
requireAuthentication.setAuthenticate(true);
requireAuthentication.setRoles(new String[] { "user" });
final ConstraintMapping authenticateAll = new ConstraintMapping();
authenticateAll.setPathSpec("/*");
authenticateAll.setConstraint(requireAuthentication);
final Constraint passThrough = new Constraint();
passThrough.setAuthenticate(false);
final ConstraintMapping healthCheckExemption = new ConstraintMapping();
healthCheckExemption.setPathSpec("/health/");
healthCheckExemption.setConstraint(passThrough);