Class BinarySecurityToken
- java.lang.Object
-
- com.sun.xml.ws.security.opt.impl.keyinfo.BinarySecurityToken
-
- All Implemented Interfaces:
BinarySecurityToken
,Token
,SecurityElement
,SecurityElementWriter
,SecurityHeaderElement
public class BinarySecurityToken extends Object implements BinarySecurityToken, SecurityHeaderElement, SecurityElementWriter
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description BinarySecurityToken(BinarySecurityTokenType token, SOAPVersion sv)
Creates a new instance of BinarySecurityToken
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509Certificate
getCertificate()
String
getEncodingType()
String
getId()
String
getLocalPart()
Gets the local name of this header element.String
getNamespaceURI()
byte[]
getTokenValue()
returns base64 decoded value of the binary securt token valueString
getValueType()
<T> T
readAsJAXB(jakarta.xml.bind.Unmarshaller unmarshaller)
<T> T
readAsJAXB(org.glassfish.jaxb.runtime.api.Bridge<T> bridge)
<T> T
readAsJAXB(org.glassfish.jaxb.runtime.api.Bridge<T> bridge, org.glassfish.jaxb.runtime.api.BridgeContext context)
XMLStreamReader
readHeader()
marshalls the BST element into the XMLStreamBufferboolean
refersToSecHdrWithId(String id)
void
setId(String id)
void
writeTo(jakarta.xml.soap.SOAPMessage saaj)
void
writeTo(OutputStream os)
void
writeTo(XMLStreamWriter streamWriter)
writes the binary security token to the XMLStreamWritervoid
writeTo(XMLStreamWriter streamWriter, HashMap props)
writes the binary security token to the XMLStreamWritervoid
writeTo(ContentHandler contentHandler, ErrorHandler errorHandler)
-
-
-
Constructor Detail
-
BinarySecurityToken
public BinarySecurityToken(BinarySecurityTokenType token, SOAPVersion sv)
Creates a new instance of BinarySecurityToken
-
-
Method Detail
-
getValueType
public String getValueType()
- Specified by:
getValueType
in interfaceBinarySecurityToken
-
getEncodingType
public String getEncodingType()
- Specified by:
getEncodingType
in interfaceBinarySecurityToken
-
getId
public String getId()
- Specified by:
getId
in interfaceSecurityElement
- Specified by:
getId
in interfaceToken
- Returns:
- id
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceSecurityElement
-
getNamespaceURI
@NotNull public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interfaceSecurityElement
- Returns:
- namespace uri of the security header element.
-
getLocalPart
@NotNull public String getLocalPart()
Description copied from interface:SecurityElement
Gets the local name of this header element.- Specified by:
getLocalPart
in interfaceSecurityElement
- Returns:
- this string must be interned.
-
readHeader
public XMLStreamReader readHeader() throws XMLStreamException
marshalls the BST element into the XMLStreamBuffer- Specified by:
readHeader
in interfaceSecurityElement
- Returns:
- XMLStreamReader
- Throws:
XMLStreamException
-
readAsJAXB
public <T> T readAsJAXB(jakarta.xml.bind.Unmarshaller unmarshaller) throws jakarta.xml.bind.JAXBException
- Throws:
jakarta.xml.bind.JAXBException
-
readAsJAXB
public <T> T readAsJAXB(org.glassfish.jaxb.runtime.api.Bridge<T> bridge, org.glassfish.jaxb.runtime.api.BridgeContext context) throws jakarta.xml.bind.JAXBException
- Throws:
jakarta.xml.bind.JAXBException
-
readAsJAXB
public <T> T readAsJAXB(org.glassfish.jaxb.runtime.api.Bridge<T> bridge) throws jakarta.xml.bind.JAXBException
- Throws:
jakarta.xml.bind.JAXBException
-
writeTo
public void writeTo(XMLStreamWriter streamWriter) throws XMLStreamException
writes the binary security token to the XMLStreamWriter- Specified by:
writeTo
in interfaceSecurityElementWriter
- Parameters:
streamWriter
- XMLStreamWriter- Throws:
XMLStreamException
-
writeTo
public void writeTo(jakarta.xml.soap.SOAPMessage saaj) throws jakarta.xml.soap.SOAPException
- Throws:
jakarta.xml.soap.SOAPException
-
writeTo
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException
- Throws:
SAXException
-
getTokenValue
public byte[] getTokenValue()
returns base64 decoded value of the binary securt token value- Specified by:
getTokenValue
in interfaceBinarySecurityToken
- Returns:
- byte[]
-
writeTo
public void writeTo(OutputStream os)
- Specified by:
writeTo
in interfaceSecurityElementWriter
-
refersToSecHdrWithId
public boolean refersToSecHdrWithId(String id)
- Specified by:
refersToSecHdrWithId
in interfaceSecurityHeaderElement
- Returns:
-
getCertificate
public X509Certificate getCertificate()
-
writeTo
public void writeTo(XMLStreamWriter streamWriter, HashMap props) throws XMLStreamException
writes the binary security token to the XMLStreamWriter- Specified by:
writeTo
in interfaceSecurityElementWriter
- Parameters:
streamWriter
- javax.xml.stream.XMLStreamWriterprops
- HashMap- Throws:
XMLStreamException
-
-