public class BinarySecurityToken extends Object
BinarySecurityToken
provides interface to parse and
create X.509 Security Token depicted by Web Service Security : X.509
Certificate Token Profile and Liberty ID-WSF Security Mechanisms
specifications.
The following schema fragment specifies the expected content within the BinarySecurityToken object.
<element name="BinarySecurityToken" type="wsse:BinarySecurityTokenType/> <complexType name="BinarySecurityTokenType"> <simpleContent> <extension base="<http://schemas.xmlsoap.org/ws/2003/06/secext>EncodedString"> <attribute name="ValueType" type="{http://www.w3.org/2001/XMLSchema}QName" /> </extension> </simpleContent> </complexType> <xsd:complexType name="EncodedString"> <xsd:simpleContent> <xsd:extension base="wsse:AttributedString"> <xsd:attribute name="EncodingType" type="xsd:QName"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="AttributedString"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute ref="wsu:Id"/> <xsd:anyAttribute namespace="##other" processContents="lax"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
Modifier and Type | Field and Description |
---|---|
static QName |
BASE64BINARY
The
BASE64BINARY encoding type indicates that the encoding
name given corresponds to base64 encoding of a binary value. |
static QName |
HEXBINARY
The
HEXBINARY encoding type indicates that
the encoding name given corresponds to Hex encoding of
a binary value. |
static QName |
PKCS7
The
PKCS7 value type indicates
that the value name given corresponds to a
PKCS7 object. |
static QName |
PKIPath
The
PKIPATH value type indicates
that the value name given corresponds to a
PKI Path object. |
static QName |
X509V3
The
X509V3 value type indicates that
the value name given corresponds to a X509 Certificate. |
Constructor and Description |
---|
BinarySecurityToken(Element token)
Constructor.
|
BinarySecurityToken(String value,
QName valueType,
QName encodingType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
QName |
getEncodingType()
Gets encoding type for the token.
|
String |
getId()
Gets id attribute for the tokens.
|
String |
getTokenValue()
Gets value of the token.
|
QName |
getValueType()
Gets value type for the token.
|
String |
toString()
Returns a String representation of the token.
|
public static final QName X509V3
X509V3
value type indicates that
the value name given corresponds to a X509 Certificate.public static final QName PKCS7
PKCS7
value type indicates
that the value name given corresponds to a
PKCS7 object.public static final QName PKIPath
PKIPATH
value type indicates
that the value name given corresponds to a
PKI Path object.public static final QName BASE64BINARY
BASE64BINARY
encoding type indicates that the encoding
name given corresponds to base64 encoding of a binary value.public static final QName HEXBINARY
HEXBINARY
encoding type indicates that
the encoding name given corresponds to Hex encoding of
a binary value.public BinarySecurityToken(String value, QName valueType, QName encodingType) throws Exception
value
- the value must be the specified valueType
and encoded in the specified encodingType
.valueType
- type of the valueencodingType
- encoding type of the valueException
- if any input parameter is nullpublic QName getEncodingType()
public QName getValueType()
public String getId()
public String getTokenValue()
Copyright © 2010-2018, ForgeRock All Rights Reserved.