예제 #1
0
  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);
      }
    }
  }
예제 #2
0
 public QName getName() {
   return SP12Constants.INSTANCE.getSecurityContextToken();
 }
예제 #3
0
 public QName getName() {
   return SP12Constants.INSTANCE.getKeyValueToken();
 }
예제 #4
0
 public QName getName() {
   return SP12Constants.INSTANCE.getKerberosToken();
 }
예제 #5
0
 public QName getName() {
   return SP12Constants.INSTANCE.getSecureConversationToken();
 }