public class BinarySecurityToken extends Object implements SecurityToken
BinarySecurityToken
represents an X509
token that can be inserted into web services security header
for message level security.
This class implements SecurityToken
and can be
created through security token factory.
Modifier and Type | Field and Description |
---|---|
static String |
BASE64BINARY
The
BASE64BINARY encoding type indicates that
the encoding name given corresponds to base64 encoding of a binary value |
static String |
HEXBINARY
The
HEXBINARY encoding type indicates that
the encoding name given corresponds to Hex encoding of
a binary value |
static String |
PKCS7
The
PKCS7 value type indicates
that the value name given corresponds to a
PKCS7 object |
static String |
PKIPATH
The
PKIPATH value type indicates
that the value name given corresponds to a
PKI Path object |
static String |
X509V3
The
X509V3 value type indicates that
the value name given corresponds to a X509 Certificate |
LIBERTY_ASSERTION_TOKEN, WSS_FAM_SSO_TOKEN, WSS_KERBEROS_TOKEN, WSS_SAML_TOKEN, WSS_SAML2_TOKEN, WSS_USERNAME_TOKEN, WSS_X509_TOKEN
Constructor and Description |
---|
BinarySecurityToken(Element token)
Constructor
|
BinarySecurityToken(KerberosTokenSpec kbSpec)
Constructor to create Kerberos Token
|
BinarySecurityToken(X509Certificate cert,
String valueType,
String encodingType) |
BinarySecurityToken(X509TokenSpec tokenSpec)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getEncodingType()
Gets encoding type for the token.
|
String |
getId()
Gets id attribute for the tokens.
|
Key |
getSecretKey()
Returns the secret key for kerberos token.
|
String |
getSigningId()
Returns the signing id for binary security token.
|
String[] |
getSubjectCertAlias()
Returns the array of certificate aliases defined in this spec.
|
String |
getTokenType()
Returns the token type.
|
String |
getTokenValue()
Gets value of the token.
|
String |
getValueType()
Gets value type for the token.
|
Element |
toDocumentElement()
Returns the
DOM Element of the binary security
token. |
String |
toString()
Returns a String representation of the token
|
public static final String X509V3
X509V3
value type indicates that
the value name given corresponds to a X509 Certificatepublic static final String PKCS7
PKCS7
value type indicates
that the value name given corresponds to a
PKCS7 objectpublic static final String PKIPATH
PKIPATH
value type indicates
that the value name given corresponds to a
PKI Path objectpublic static final String BASE64BINARY
BASE64BINARY
encoding type indicates that
the encoding name given corresponds to base64 encoding of a binary valuepublic static final String HEXBINARY
HEXBINARY
encoding type indicates that
the encoding name given corresponds to Hex encoding of
a binary valuepublic BinarySecurityToken(X509TokenSpec tokenSpec) throws SecurityException
tokenSpec
- the X509TokenSpec
for generating
binary security token.SecurityException
public BinarySecurityToken(X509Certificate cert, String valueType, String encodingType) throws SecurityException
SecurityException
public BinarySecurityToken(KerberosTokenSpec kbSpec) throws SecurityException
kbSpec
- The Kerberos Token SpecificationSecurityException
public BinarySecurityToken(Element token) throws SecurityException
token
- Binary Security Token ElementSecurityException
- if token Element is not a valid binary
security tokenpublic String getEncodingType()
public String getValueType()
public String getId()
public String getTokenValue()
public Key getSecretKey()
public String toString()
public String getTokenType()
getTokenType
in interface SecurityToken
public String[] getSubjectCertAlias()
public String getSigningId()
public Element toDocumentElement() throws SecurityException
DOM
Element of the binary security
token.toDocumentElement
in interface SecurityToken
SecurityException
- if the document element can not be
created.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.