本文整理了Java中org.opensaml.saml1.core.Assertion.getSignature()
方法的一些代码示例,展示了Assertion.getSignature()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.getSignature()
方法的具体详情如下:
包路径:org.opensaml.saml1.core.Assertion
类名称:Assertion
方法名:getSignature
暂无
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.relyingparty
/**
* @return the SAML signature.
*/
@Override
public Signature getSAMLSignature() {
return assertion.getSignature();
}
代码示例来源:origin: org.apache.ws.security/wss4j
public Signature getSignature() {
Signature sig = null;
if (saml2 != null && saml2.getSignature() != null) {
sig = saml2.getSignature();
} else if (saml1 != null && saml1.getSignature() != null) {
sig = saml1.getSignature();
}
return sig;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
public Signature getSignature() {
Signature sig = null;
if (saml2 != null && saml2.getSignature() != null) {
sig = saml2.getSignature();
} else if (saml1 != null && saml1.getSignature() != null) {
sig = saml1.getSignature();
}
return sig;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
/**
* Method isSigned returns the signed of this AssertionWrapper object.
*
* @return the signed (type boolean) of this AssertionWrapper object.
*/
public boolean isSigned() {
if (saml2 != null) {
return saml2.isSigned() || saml2.getSignature() != null;
} else if (saml1 != null) {
return saml1.isSigned() || saml1.getSignature() != null;
}
return false;
}
代码示例来源:origin: org.apache.ws.security/wss4j
/**
* Method isSigned returns the signed of this AssertionWrapper object.
*
* @return the signed (type boolean) of this AssertionWrapper object.
*/
public boolean isSigned() {
if (saml2 != null) {
return saml2.isSigned() || saml2.getSignature() != null;
} else if (saml1 != null) {
return saml1.isSigned() || saml1.getSignature() != null;
}
return false;
}
代码示例来源:origin: org.apache.rampart/rampart-trust
/**
* Checks whether the token is valid or not, by verifying the issuer's own
* signature. If it has been signed by the token issuer, then it is a valid
* token.
*
* @param token
* the token to validate.
* @param issuerPBKey Public key which should be used during validation.
* @return true if the token has been signed by the issuer.
*/
private boolean isValid(Token token, PublicKey issuerPBKey) {
// extract SAMLAssertion object from token
OMElement assertionOMElement = token.getToken();
Assertion samlAssertion;
try {
samlAssertion = SAMLUtils.buildAssertion((Element) assertionOMElement);
log.info("Verifying token validity...");
// check if the token has been signed by the issuer.
SignatureValidator validator = new SignatureValidator(samlAssertion.getSignature().getSigningCredential());
validator.validate(samlAssertion.getSignature());
} catch (ValidationException e) {
log.error("Signature verification failed on SAML token.", e);
return false;
}
// if there was no exception, then the token is valid
return true;
}
代码示例来源:origin: org.apache.ws.security/wss4j
if (saml2 != null && saml2.getSignature() != null) {
sig = saml2.getSignature();
} else if (saml1 != null && saml1.getSignature() != null) {
sig = saml1.getSignature();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
if (saml2 != null && saml2.getSignature() != null) {
sig = saml2.getSignature();
} else if (saml1 != null && saml1.getSignature() != null) {
sig = saml1.getSignature();
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth
profileValidator.validate(assertion.getSignature());
} catch (ValidationException e) {
X509Credential x509Credential = new X509CredentialImpl(x509Certificate);
SignatureValidator signatureValidator = new SignatureValidator(x509Credential);
signatureValidator.validate(assertion.getSignature());
if(log.isDebugEnabled()) {
log.debug("Signature validation successful");
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.oauth
profileValidator.validate(assertion.getSignature());
} catch (ValidationException e) {
X509Credential x509Credential = new X509CredentialImpl(x509Certificate);
SignatureValidator signatureValidator = new SignatureValidator(x509Credential);
signatureValidator.validate(assertion.getSignature());
if(log.isDebugEnabled()) {
log.debug("Signature validation successful");
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
signObject(assertion.getSignature());
(org.opensaml.saml1.core.Assertion) xmlObject;
signObject(saml1.getSignature());
} else if (xmlObject instanceof org.opensaml.saml2.core.RequestAbstractType) {
org.opensaml.saml2.core.RequestAbstractType request =
代码示例来源:origin: org.apache.ws.security/wss4j
signObject(assertion.getSignature());
(org.opensaml.saml1.core.Assertion) xmlObject;
signObject(saml1.getSignature());
} else if (xmlObject instanceof org.opensaml.saml2.core.RequestAbstractType) {
org.opensaml.saml2.core.RequestAbstractType request =
内容来源于网络,如有侵权,请联系作者删除!