String type = element.getAttributeNS(null, "ValueType");
BinarySecurity token = null;
if (X509Security.X509_V3_TYPE.equals(type)) {
token = new X509Security(element, data.getBSPEnforcer());
} else if (PKIPathSecurity.getType().equals(type)) {
token = new PKIPathSecurity(element, data.getBSPEnforcer());
} else if (KerberosSecurity.isKerberosToken(type)) {
token = new KerberosSecurity(element, data.getBSPEnforcer());
} else {
token = new BinarySecurity(element, data.getBSPEnforcer());
}