|| WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(type) || WSConstants.WSS_SAML2_KI_VALUE_TYPE.equals(type) || KerberosSecurity.isKerberosToken(type))) {
|| WSConstants.WSS_SAML_KI_VALUE_TYPE.equals(type) || WSConstants.WSS_SAML2_KI_VALUE_TYPE.equals(type) || KerberosSecurity.isKerberosToken(type))) {
/** * Checks the <code>element</code> and creates appropriate binary security object. * * @param element The XML element that contains either a <code>BinarySecurityToken * </code> or a <code>PKIPath</code> element. * @param config A WSSConfig instance * @return a BinarySecurity token element * @throws WSSecurityException */ private BinarySecurity createSecurityToken( Element element, WSSConfig config ) throws WSSecurityException { String type = element.getAttributeNS(null, "ValueType"); BinarySecurity token = null; if (X509Security.X509_V3_TYPE.equals(type)) { token = new X509Security(element, config.isWsiBSPCompliant()); } else if (PKIPathSecurity.getType().equals(type)) { token = new PKIPathSecurity(element, config.isWsiBSPCompliant()); } else if (KerberosSecurity.isKerberosToken(type)) { token = new KerberosSecurity(element, config.isWsiBSPCompliant()); } else { token = new BinarySecurity(element, config.isWsiBSPCompliant()); } return token; }
/** * Checks the <code>element</code> and creates appropriate binary security object. * * @param element The XML element that contains either a <code>BinarySecurityToken * </code> or a <code>PKIPath</code> element. * @param config A WSSConfig instance * @return a BinarySecurity token element * @throws WSSecurityException */ private BinarySecurity createSecurityToken( Element element, WSSConfig config ) throws WSSecurityException { String type = element.getAttributeNS(null, "ValueType"); BinarySecurity token = null; if (X509Security.X509_V3_TYPE.equals(type)) { token = new X509Security(element, config.isWsiBSPCompliant()); } else if (PKIPathSecurity.getType().equals(type)) { token = new PKIPathSecurity(element, config.isWsiBSPCompliant()); } else if (KerberosSecurity.isKerberosToken(type)) { token = new KerberosSecurity(element, config.isWsiBSPCompliant()); } else { token = new BinarySecurity(element, config.isWsiBSPCompliant()); } return token; }
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); ref.setValueType(customValueType); } else if (KerberosSecurity.isKerberosToken(customValueType)) { secRef.addTokenType(customValueType); ref.setValueType(customValueType);
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); ref.setValueType(customValueType); } else if (KerberosSecurity.isKerberosToken(customValueType)) { secRef.addTokenType(customValueType); ref.setValueType(customValueType);
if (KerberosSecurity.isKerberosToken(customReferenceValue)) { secToken.addTokenType(customReferenceValue); } else if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(customReferenceValue)) {
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCust.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCust.setValueType(customTokenValueType); secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCustd.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCustd.setValueType(customTokenValueType);
if (KerberosSecurity.isKerberosToken(customReferenceValue)) { secToken.addTokenType(customReferenceValue); } else if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(customReferenceValue)) {
secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCust.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCust.setValueType(customTokenValueType); secRef.addTokenType(WSConstants.WSS_ENC_KEY_VALUE_TYPE); refCustd.setValueType(customTokenValueType); } else if (KerberosSecurity.isKerberosToken(customTokenValueType)) { secRef.addTokenType(customTokenValueType); refCustd.setValueType(customTokenValueType);