public IdentChain testIdentityChain(RequestContext ctx, TimeConstraints timeConstraints) throws SimpleException {
ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
if (ctx.getIdentity() == null) {
return null;
}
IdentChain result = new IdentChain();
result.setIdentities(new ArrayList<Ident>());
for (Identity i: ctx.getIdentity().getIdentities()) {
Ident ident = new Ident();
ident.setPrincipal(i.getPrincipal().getName());
ident.setCredentialName(i.getCredential().getName());
ident.setCredentialValue((String)i.getCredential().getValue());
result.getIdentities().add(ident);
}
return result;
}