}
//TODO V3 what happens for Public/Private Credentials of Mapped case (Case II)
for (Callback callback : mappedCallbacks) {
if (callback instanceof CallerPrincipalCallback) {
CallerPrincipalCallback cpc = (CallerPrincipalCallback) callback;
s.getPrincipals().addAll(cpc.getSubject().getPrincipals());
s.getPublicCredentials().addAll(cpc.getSubject().getPublicCredentials());
s.getPrivateCredentials().addAll(cpc.getSubject().getPrivateCredentials());
} else if (callback instanceof GroupPrincipalCallback) {
GroupPrincipalCallback gpc = (GroupPrincipalCallback) callback;
s.getPrincipals().addAll(gpc.getSubject().getPrincipals());
s.getPublicCredentials().addAll(gpc.getSubject().getPublicCredentials());
s.getPrivateCredentials().addAll(gpc.getSubject().getPrivateCredentials());