/** * Get the SignatureConfirmation element generated during * <code>prepare()</code>. * * @return Return the SignatureConfirmation element or null if <code>prepare()</code> * was not called before. */ public Element getSignatureConfirmationElement() { return (sc != null) ? sc.getElement() : null; }
/** * Get the id generated during <code>prepare()</code>. * * Returns the the value of wsu:Id attribute of this SignatureConfirmation. * * @return Return the wsu:Id of this token or null if <code>prepareToken()</code> * was not called before. */ public String getId() { if (sc == null) { return null; } return sc.getID(); }
@Override public boolean equals(Object object) { if (!(object instanceof SignatureConfirmation)) { return false; } SignatureConfirmation signatureConfirmation = (SignatureConfirmation)object; byte[] sigValue = signatureConfirmation.getSignatureValue(); if (!Arrays.equals(sigValue, getSignatureValue())) { return false; } return true; }
/** * Creates a SignatureConfimation element. * * The method prepares and initializes a WSSec SignatureConfirmation structure after * the relevant information was set. Before calling <code>prepare()</code> the * filed <code>signatureValue</code> must be set * * @param doc The SOAP envelope as W3C document */ public void prepare(Document doc) { sc = new SignatureConfirmation(doc, signatureValue); sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc)); }
SignatureConfirmation sigConf = new SignatureConfirmation(elem); String id = sigConf.getID();
/** * Creates a SignatureConfimation element. * * The method prepares and initializes a WSSec SignatureConfirmation structure after * the relevant information was set. Before calling <code>prepare()</code> the * filed <code>signatureValue</code> must be set * * @param doc The SOAP envelope as W3C document */ public void prepare(Document doc) { sc = new SignatureConfirmation(doc, signatureValue); sc.setID(getWsConfig().getIdAllocator().createId("SC-", sc)); }
SignatureConfirmation sigConf = new SignatureConfirmation(elem); String id = sigConf.getID();
/** * Get the SignatureConfirmation element generated during * <code>prepare()</code>. * * @return Return the SignatureConfirmation element or null if <code>prepare()</code> * was not called before. */ public Element getSignatureConfirmationElement() { return (sc != null) ? sc.getElement() : null; }
@Override public boolean equals(Object object) { if (!(object instanceof SignatureConfirmation)) { return false; } SignatureConfirmation signatureConfirmation = (SignatureConfirmation)object; byte[] sigValue = signatureConfirmation.getSignatureValue(); if (!Arrays.equals(sigValue, getSignatureValue())) { return false; } return true; }
/** * Get the id generated during <code>prepare()</code>. * * Returns the the value of wsu:Id attribute of this SignatureConfirmation. * * @return Return the wsu:Id of this token or null if <code>prepareToken()</code> * was not called before. */ public String getId() { if (sc == null) { return null; } return sc.getID(); }
/** * Prepends the SignatureConfirmation element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SignatureConfirmation element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sc.getElement()); }
); byte[] sigVal = sc.getSignatureValue(); if (sigVal != null) { if (savedSignatures == null || savedSignatures.size() == 0) {
/** * Prepends the SignatureConfirmation element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SignatureConfirmation element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sc.getElement()); }
); byte[] sigVal = sc.getSignatureValue(); if (sigVal != null) { if (savedSignatures == null || savedSignatures.size() == 0) {
public WSSecurityEngineResult(int act, SignatureConfirmation sc) { put(TAG_ACTION, Integer.valueOf(act)); put(TAG_SIGNATURE_CONFIRMATION, sc); put(TAG_VALIDATED_TOKEN, Boolean.FALSE); put(TAG_TOKEN_ELEMENT, sc.getElement()); }
public WSSecurityEngineResult(int act, SignatureConfirmation sc) { put(TAG_ACTION, Integer.valueOf(act)); put(TAG_SIGNATURE_CONFIRMATION, sc); put(TAG_VALIDATED_TOKEN, Boolean.FALSE); put(TAG_TOKEN_ELEMENT, sc.getElement()); }