Class Signature
java.lang.Object
com.sun.xml.ws.security.opt.impl.incoming.Signature
- All Implemented Interfaces:
NamespaceContextInfo,PolicyBuilder,SecurityElement,SecurityElementWriter,SecurityHeaderElement
public class Signature
extends Object
implements SecurityHeaderElement, NamespaceContextInfo, SecurityElementWriter, PolicyBuilder
<element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType">
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignature(JAXBFilterProcessingContext jpc, Map<String, String> namespaceList, com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator sbc) Creates a new instance of SignatureProcessorSignature(JAXBFilterProcessingContext jpc, Map<String, String> namespaceList, com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator sbc, boolean cacheSig) -
Method Summary
Modifier and TypeMethodDescriptiongetId()map of all inscope namespace declarations.Gets the local name of this header element.returns theWSSPolicythat was created for the SecurityHeaderElementbooleanisReady()booleanvoidprocess(XMLStreamReader signature) voidprocess(XMLStreamReader signature, boolean storeSigConfirmValue) Reads the header as aXMLStreamReader.booleanvoidbooleanvalidate()booleanbooleanwrapWithDigester(Reference ref, XMLStreamReader message, String bodyPrologue, String bodyEpilogue, com.sun.xml.ws.encoding.TagInfoset bodyTag, HashMap<String, String> parentNS, boolean payLoad) voidwriteTo(OutputStream os) voidwriteTo(XMLStreamWriter streamWriter) Writes out the header.voidwriteTo(XMLStreamWriter streamWriter, HashMap props)
-
Field Details
-
SIGNEDINFO_EVENT
public static final int SIGNEDINFO_EVENT- See Also:
-
SIGNATUREVALUE_EVENT
public static final int SIGNATUREVALUE_EVENT- See Also:
-
KEYINFO_EVENT
public static final int KEYINFO_EVENT- See Also:
-
OBJECT_EVENT
public static final int OBJECT_EVENT- See Also:
-
SIGNED_INFO
- See Also:
-
SIGNATURE_VALUE
- See Also:
-
KEYINFO
- See Also:
-
OBJECT
- See Also:
-
-
Constructor Details
-
Signature
public Signature(JAXBFilterProcessingContext jpc, Map<String, String> namespaceList, com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator sbc) Creates a new instance of SignatureProcessor -
Signature
public Signature(JAXBFilterProcessingContext jpc, Map<String, String> namespaceList, com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator sbc, boolean cacheSig)
-
-
Method Details
-
process
- Throws:
XWSSecurityException
-
process
public void process(XMLStreamReader signature, boolean storeSigConfirmValue) throws XWSSecurityException - Throws:
XWSSecurityException
-
validate
- Throws:
XWSSecurityException
-
removeReferenceWithID
-
getReferences
-
isValidated
public boolean isValidated() -
isReady
- Throws:
XWSSecurityException
-
verifyReferences
public boolean verifyReferences() -
verifySignatureValue
public boolean verifySignatureValue() -
refersToSecHdrWithId
- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement
-
getId
- Specified by:
getIdin interfaceSecurityElement- Returns:
- id
-
setId
- Specified by:
setIdin interfaceSecurityElement
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceSecurityElement- Returns:
- namespace uri of the security header element.
-
getLocalPart
Description copied from interface:SecurityElementGets the local name of this header element.- Specified by:
getLocalPartin interfaceSecurityElement- Returns:
- this string must be interned.
-
readHeader
Description copied from interface:SecurityElementReads the header as aXMLStreamReader.The returned parser points at the start element of this header. (IOW,
XMLStreamReader.getEventType()would returnXMLStreamConstants.START_ELEMENT.Performance Expectation
For some Header implementations, this operation is a non-trivial operation. Therefore, use of this method is discouraged unless the caller is interested in reading the whole header.
Similarly, if the caller wants to use this method only to do the API conversion (such as simply firing SAX events from
XMLStreamReader), then the JAX-WS team requests that you talk to us.Messages that come from tranport usually provides a reasonably efficient implementation of this method.
- Specified by:
readHeaderin interfaceSecurityElement- Returns:
- must not null.
-
writeTo
- Specified by:
writeToin interfaceSecurityElementWriter
-
writeTo
Description copied from interface:SecurityElementWriterWrites out the header.- Specified by:
writeToin interfaceSecurityElementWriter- Throws:
XMLStreamException- if the operation fails for some reason. This leaves the writer to an undefined state.
-
wrapWithDigester
public XMLStreamReader wrapWithDigester(Reference ref, XMLStreamReader message, String bodyPrologue, String bodyEpilogue, com.sun.xml.ws.encoding.TagInfoset bodyTag, HashMap<String, String> parentNS, boolean payLoad) throws XWSSecurityException- Throws:
XWSSecurityException
-
writeTo
- Specified by:
writeToin interfaceSecurityElementWriter
-
getInscopeNSContext
Description copied from interface:NamespaceContextInfomap of all inscope namespace declarations.- Specified by:
getInscopeNSContextin interfaceNamespaceContextInfo- Returns:
HashMapof all inscope namespaces.
-
getPolicy
Description copied from interface:PolicyBuilderreturns theWSSPolicythat was created for the SecurityHeaderElement- Specified by:
getPolicyin interfacePolicyBuilder- Returns:
WSSPolicy
-