private void processAlternatives(
      List assertions, SymmetricBinding symmetricBinding, SPConstants consts) {
    Assertion assertion;
    QName name;

    for (Iterator iterator = assertions.iterator(); iterator.hasNext(); ) {
      assertion = (Assertion) iterator.next();
      name = assertion.getName();

      if (!consts.getNamespace().equals(name.getNamespaceURI())
          && !SP12Constants.INSTANCE.getNamespace().equals(name.getNamespaceURI())) {
        continue;
      }

      if (SPConstants.ALGO_SUITE.equals(name.getLocalPart())) {
        symmetricBinding.setAlgorithmSuite((AlgorithmSuite) assertion);

      } else if (SPConstants.LAYOUT.equals(name.getLocalPart())) {
        symmetricBinding.setLayout((Layout) assertion);

      } else if (SPConstants.INCLUDE_TIMESTAMP.equals(name.getLocalPart())) {
        symmetricBinding.setIncludeTimestamp(true);

      } else if (SPConstants.PROTECTION_TOKEN.equals(name.getLocalPart())) {
        symmetricBinding.setProtectionToken((ProtectionToken) assertion);

      } else if (SPConstants.ENCRYPT_BEFORE_SIGNING.equals(name.getLocalPart())) {
        symmetricBinding.setProtectionOrder(SPConstants.ProtectionOrder.EncryptBeforeSigning);

      } else if (SPConstants.SIGN_BEFORE_ENCRYPTING.equals(name.getLocalPart())) {
        symmetricBinding.setProtectionOrder(SPConstants.ProtectionOrder.SignBeforeEncrypting);

      } else if (SPConstants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY.equals(name.getLocalPart())) {
        symmetricBinding.setEntireHeadersAndBodySignatures(true);
      } else if (SPConstants.ENCRYPT_SIGNATURE.equals(name.getLocalPart())) {
        symmetricBinding.setSignatureProtection(true);
      }
    }
  }
Esempio n. 2
0
 public QName getName() {
   return SP12Constants.INSTANCE.getSecurityContextToken();
 }
Esempio n. 3
0
 public QName getName() {
   return SP12Constants.INSTANCE.getKeyValueToken();
 }
Esempio n. 4
0
 public QName getName() {
   return SP12Constants.INSTANCE.getKerberosToken();
 }
 public QName getName() {
   return SP12Constants.INSTANCE.getSecureConversationToken();
 }