本文整理了Java中org.opensaml.saml.saml1.core.Assertion.getSignature()
方法的一些代码示例,展示了Assertion.getSignature()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.getSignature()
方法的具体详情如下:
包路径:org.opensaml.saml.saml1.core.Assertion
类名称:Assertion
方法名:getSignature
暂无
代码示例来源:origin: org.jasig.cas/cas-server-support-wsfederation
if (assertion.getSignature() != null) {
final SignaturePrevalidator validator = new SAMLSignatureProfileValidator();
try {
validator.validate(assertion.getSignature());
valid = engine.validate(assertion.getSignature(), criteriaSet);
} catch (final SecurityException e) {
LOGGER.warn(e.getMessage(), e);
代码示例来源:origin: org.apereo.cas/cas-server-support-wsfederation
return false;
val signature = assertion.getSignature();
if (signature == null) {
LOGGER.warn("No signature is attached to the assertion to validate");
代码示例来源:origin: apache/cxf
private void signAssertion(
SamlAssertionWrapper assertion,
TokenRenewerParameters tokenParameters
) throws Exception {
if (signToken) {
STSPropertiesMBean stsProperties = tokenParameters.getStsProperties();
String realm = tokenParameters.getRealm();
RealmProperties samlRealm = null;
if (realm != null && realmMap.containsKey(realm)) {
samlRealm = realmMap.get(realm);
}
signToken(assertion, samlRealm, stsProperties, tokenParameters.getKeyRequirements());
} else {
if (assertion.getSaml1().getSignature() != null) {
assertion.getSaml1().setSignature(null);
} else if (assertion.getSaml2().getSignature() != null) {
assertion.getSaml2().setSignature(null);
}
}
}
代码示例来源:origin: org.apache.cxf.services.sts/cxf-services-sts-core
private void signAssertion(
SamlAssertionWrapper assertion,
TokenRenewerParameters tokenParameters
) throws Exception {
if (signToken) {
STSPropertiesMBean stsProperties = tokenParameters.getStsProperties();
String realm = tokenParameters.getRealm();
RealmProperties samlRealm = null;
if (realm != null && realmMap.containsKey(realm)) {
samlRealm = realmMap.get(realm);
}
signToken(assertion, samlRealm, stsProperties, tokenParameters.getKeyRequirements());
} else {
if (assertion.getSaml1().getSignature() != null) {
assertion.getSaml1().setSignature(null);
} else if (assertion.getSaml2().getSignature() != null) {
assertion.getSaml2().setSignature(null);
}
}
}
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common
private static void signXMLObject(XMLObject xmlObject) throws WSSecurityException {
if (xmlObject instanceof org.opensaml.saml.saml1.core.Response) {
org.opensaml.saml.saml1.core.Response response =
(org.opensaml.saml.saml1.core.Response)xmlObject;
// Sign any Assertions
if (response.getAssertions() != null) {
for (org.opensaml.saml.saml1.core.Assertion assertion : response.getAssertions()) {
signObject(assertion.getSignature());
}
}
signObject(response.getSignature());
} else if (xmlObject instanceof org.opensaml.saml.saml2.core.Response) {
org.opensaml.saml.saml2.core.Response response =
(org.opensaml.saml.saml2.core.Response)xmlObject;
// Sign any Assertions
if (response.getAssertions() != null) {
for (org.opensaml.saml.saml2.core.Assertion assertion : response.getAssertions()) {
signObject(assertion.getSignature());
}
}
signObject(response.getSignature());
} else if (xmlObject instanceof SignableSAMLObject) {
signObject(((SignableSAMLObject)xmlObject).getSignature());
}
}
内容来源于网络,如有侵权,请联系作者删除!