if (ch_clazz == null) {
ch_clazz = NamePasswordCallbackHandler.class;
}
CallbackHandler ch = (CallbackHandler)Construction.construct(ch_clazz);
if (ch instanceof SwitchYardCallbackHandler) {
SwitchYardCallbackHandler sych = (SwitchYardCallbackHandler)ch;
sych.setProperties(serviceSecurity.getProperties());
sych.setCredentials(securityContext.getCredentials());
}
String securityDomain = serviceSecurity.getSecurityDomain();
Subject subject = securityContext.getSubject(securityDomain);
try {
new LoginContext(securityDomain, subject, ch).login();