* @throws WSSecurityException
*/
private BinarySecurity createSecurityToken(Element element) throws WSSecurityException {
BinarySecurity token = new BinarySecurity(element);
String type = token.getValueType();
X509Security x509 = null;
PKIPathSecurity pkiPath = null;
if (X509Security.X509_V3_TYPE.equals(type)) {
x509 = new X509Security(element);
return (BinarySecurity) x509;
} else if (X509Security.X509_V1_TYPE.equals(type)) {
x509 = new X509Security(element);
return (BinarySecurity) x509;
} else if (PKIPathSecurity.getType().equals(type)) {
pkiPath = new PKIPathSecurity(element);
return (BinarySecurity) pkiPath;
}