org.opensaml.saml.saml1.core.Assertion.setAdvice()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.opensaml.saml.saml1.core.Assertion.setAdvice()方法的一些代码示例,展示了Assertion.setAdvice()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.setAdvice()方法的具体详情如下:
包路径:org.opensaml.saml.saml1.core.Assertion
类名称:Assertion
方法名:setAdvice

Assertion.setAdvice介绍

[英]Set the Object representing the Advice sub element.
[中]设置表示Advice子元素的对象。

代码示例

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
    throws UnmarshallingException {
  Assertion assertion = (Assertion) parentSAMLObject;
  if (childSAMLObject instanceof Signature) {
    assertion.setSignature((Signature) childSAMLObject);
  } else if (childSAMLObject instanceof Conditions) {
    assertion.setConditions((Conditions) childSAMLObject);
  } else if (childSAMLObject instanceof Advice) {
    assertion.setAdvice((Advice) childSAMLObject);
  } else if (childSAMLObject instanceof Statement) {
    assertion.getStatements().add((Statement) childSAMLObject);
  } else {
    super.processChildElement(parentSAMLObject, childSAMLObject);
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common

org.opensaml.saml.saml1.core.Advice advice =
  SAML1ComponentBuilder.createAdvice(samlCallback.getAdvice());
saml1.setAdvice(advice);

相关文章