WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN, credential.getTransformedToken()
);
if (credential.getPrincipal() != null) {
result.put(WSSecurityEngineResult.TAG_PRINCIPAL, credential.getPrincipal());
} else {
SAMLTokenPrincipalImpl samlPrincipal =
new SAMLTokenPrincipalImpl(credential.getTransformedToken());
result.put(WSSecurityEngineResult.TAG_PRINCIPAL, samlPrincipal);
}
} else if (credential.getPrincipal() != null) {
result.put(WSSecurityEngineResult.TAG_PRINCIPAL, credential.getPrincipal());
} else {
result.put(WSSecurityEngineResult.TAG_PRINCIPAL, new SAMLTokenPrincipalImpl(samlAssertion));
}
result.put(WSSecurityEngineResult.TAG_SUBJECT, credential.getSubject());
}
wsDocInfo.addResult(result);
return java.util.Collections.singletonList(result);