@Override public int hashCode() { int result = 17; String uri = getURI(); if (uri != null) { result = 31 * result + uri.hashCode(); } String valueType = getValueType(); if (valueType != null) { result = 31 * result + valueType.hashCode(); } return result; }
@Override public int hashCode() { int result = 17; String uri = getURI(); if (uri != null) { result = 31 * result + uri.hashCode(); } String valueType = getValueType(); if (valueType != null) { result = 31 * result + valueType.hashCode(); } return result; }
@Override public boolean equals(Object object) { if (!(object instanceof Reference)) { return false; } Reference reference = (Reference)object; if (!compare(getURI(), reference.getURI())) { return false; } if (!compare(getValueType(), reference.getValueType())) { return false; } return true; }
@Override public boolean equals(Object object) { if (!(object instanceof Reference)) { return false; } Reference reference = (Reference)object; if (!compare(getURI(), reference.getURI())) { return false; } if (!compare(getValueType(), reference.getValueType())) { return false; } return true; }
/** * Check that the Username token referenced by the SecurityTokenReference argument * is BSP compliant. * @param secRef The SecurityTokenReference to the Username token * @throws WSSecurityException */ public static void checkUsernameTokenBSPCompliance( SecurityTokenReference secRef ) throws WSSecurityException { if (!secRef.containsReference()) { // BSP does not permit using a KeyIdentifier to refer to a U/T throw new WSSecurityException( WSSecurityException.FAILED_CHECK, "unsupportedKeyId" ); } String valueType = secRef.getReference().getValueType(); if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(valueType)) { // BSP says the Reference must have a ValueType of UsernameToken throw new WSSecurityException( WSSecurityException.INVALID_SECURITY, "invalidValueType", new Object[]{valueType} ); } }
if (secRef.containsReference()) { String valueType = secRef.getReference().getValueType(); if (((token instanceof X509Security) && !X509Security.X509_V3_TYPE.equals(valueType)) || ((token instanceof PKIPathSecurity) && !PKIPathSecurity.PKI_TYPE.equals(valueType))
/** * Check that the Username token referenced by the SecurityTokenReference argument * is BSP compliant. * @param secRef The SecurityTokenReference to the Username token * @throws WSSecurityException */ public static void checkUsernameTokenBSPCompliance( SecurityTokenReference secRef ) throws WSSecurityException { if (!secRef.containsReference()) { // BSP does not permit using a KeyIdentifier to refer to a U/T throw new WSSecurityException( WSSecurityException.FAILED_CHECK, "unsupportedKeyId" ); } String valueType = secRef.getReference().getValueType(); if (!WSConstants.WSS_USERNAME_TOKEN_VALUE_TYPE.equals(valueType)) { // BSP says the Reference must have a ValueType of UsernameToken throw new WSSecurityException( WSSecurityException.INVALID_SECURITY, "invalidValueType", new Object[]{valueType} ); } }
if (secRef.containsReference()) { String valueType = secRef.getReference().getValueType(); if (((token instanceof X509Security) && !X509Security.X509_V3_TYPE.equals(valueType)) || ((token instanceof PKIPathSecurity) && !PKIPathSecurity.PKI_TYPE.equals(valueType))
if (ref != null) { uri = ref.getURI(); valueType = ref.getValueType(); } else { uri = getKeyIdentifierValue();
if (ref != null) { uri = ref.getURI(); valueType = ref.getValueType(); } else { uri = getKeyIdentifierValue();
String valueType = secRef.getReference().getValueType(); if (valueType != null && !"".equals(valueType)) { throw new WSSecurityException(
String valueType = secRef.getReference().getValueType(); if (valueType != null && !"".equals(valueType)) { throw new WSSecurityException(
Reference reference = secRef.getReference(); secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data); principal = new CustomTokenPrincipal(uri); secRef.findProcessedTokenElement( strElement.getOwnerDocument(), wsDocInfo, data.getCallbackHandler(), uri, secRef.getReference().getValueType() ); AssertionWrapper assertion = null;
Reference reference = secRef.getReference(); secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data); principal = new CustomTokenPrincipal(uri); secRef.findProcessedTokenElement( strElement.getOwnerDocument(), wsDocInfo, data.getCallbackHandler(), uri, secRef.getReference().getValueType() ); AssertionWrapper assertion = null;
Reference reference = secRef.getReference(); secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data); if (secretKey == null) { Element token =
Reference reference = secRef.getReference(); secretKey = getSecretKeyFromToken(uri, reference.getValueType(), data); if (secretKey == null) { Element token =