writeIdentity(context.getIdentityTokens(), new IdentityTokenIOAdapter() {
@Override
public void rewriteIdentityTokens(List<IdentityToken> identityTokens) {
OMElement element = header.addHeaderBlock(SECURITY_CREDENTIALS, factory.createOMNamespace(SECURITY_NAMESPACE, SECURITY_PREFIX));
identityTokenResolver.rewrite(identityTokens, element);
}
@Override
public boolean isRewriteSupported() {
return identityTokenResolver.isRewriteSupported();