本文整理了Java中org.opensaml.saml2.core.Assertion.getVersion()
方法的一些代码示例,展示了Assertion.getVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.getVersion()
方法的具体详情如下:
包路径:org.opensaml.saml2.core.Assertion
类名称:Assertion
方法名:getVersion
[英]Gets the SAML Version of this assertion.
[中]获取此断言的SAML版本。
代码示例来源:origin: org.opensaml/opensaml
/**
* Checks that the Version attribute is present.
*
* @param assertion
* @throws ValidationException
*/
protected void validateVersion(Assertion assertion) throws ValidationException {
if (assertion.getVersion() == null) {
throw new ValidationException("Version is required attribute");
}
}
代码示例来源:origin: org.opensaml/opensaml
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
Assertion assertion = (Assertion) samlObject;
if (assertion.getVersion() != null) {
domElement.setAttributeNS(null, Assertion.VERSION_ATTRIB_NAME, assertion.getVersion().toString());
}
if (assertion.getIssueInstant() != null) {
String issueInstantStr = Configuration.getSAMLDateFormatter().print(assertion.getIssueInstant());
domElement.setAttributeNS(null, Assertion.ISSUE_INSTANT_ATTRIB_NAME, issueInstantStr);
}
if (assertion.getID() != null) {
domElement.setAttributeNS(null, Assertion.ID_ATTRIB_NAME, assertion.getID());
domElement.setIdAttributeNS(null, Assertion.ID_ATTRIB_NAME, true);
}
}
}
代码示例来源:origin: usnistgov/iheos-toolkit2
if (oElement.getVersion() != null) {
oSamlEvidAssert.setVersion(oElement.getVersion().toString());
log.debug("Assertion.SamlAuthzDecisionStatement.Evidence.Assertion.Version = " + oSamlEvidAssert.getVersion());
内容来源于网络,如有侵权,请联系作者删除!