// Here we get some information about the document that is being
// processed, in particular the crypto implementation, and already
// detected BST that may be used later during dereferencing.
//
if (secRef.containsReference()) {
Element token = secRef.getTokenElement(elem.getOwnerDocument(), wsDocInfo, cb);
//
// at this point check token type: UsernameToken, Binary, SAML
// Crypto required only for Binary and SAML
//