Package org.opensaml.xml.signature

Examples of org.opensaml.xml.signature.SignatureValidator.validate()


                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here


            LOG.fine("Can't get X509Certificate or PublicKey to verify signature");
            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
        }
        SignatureValidator sigValidator = new SignatureValidator(credential);
        try {
            sigValidator.validate(signature);
        } catch (ValidationException ex) {
            LOG.log(Level.FINE, "Error in validating the SAML Signature: " + ex.getMessage(), ex);
            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
        }
    }
View Full Code Here

                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here

            LOG.fine("Can't get X509Certificate or PublicKey to verify signature");
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
        }
        SignatureValidator sigValidator = new SignatureValidator(credential);
        try {
            sigValidator.validate(signature);
        } catch (ValidationException ex) {
            LOG.log(Level.FINE, "Error in validating the SAML Signature: " + ex.getMessage(), ex);
            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
        }
    }
View Full Code Here

                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here

          }
        }
      }

      SignatureValidator validator = new SignatureValidator(credential);
      validator.validate(sig);
      holder.populateAttributeTable(this.attributeTable);

    } catch (Exception e) {
      log.debug(e);
      throw new RelyingPartyException("errorInTokenVerification", e);
View Full Code Here

        boolean isSignatureValid = false;

        if (assertion.getSignature() != null) {
            try {
                SignatureValidator validator = new SignatureValidator(SAMLSSOUtil.getX509CredentialImplForTenant(domainName, alias));
                validator.validate(assertion.getSignature());
                isSignatureValid = true;
            } catch (IdentitySAML2SSOException ignore) {
                log.warn("Signature validation failed for the SAML Assertion : Failed to construct the X509CredentialImpl for the alias " + alias);
            } catch (ValidationException ignore) {
                log.warn("Signature Validation Failed for the SAML Assertion : Signature is invalid.");
View Full Code Here

                            }
                        }
                        // validate the signature
                        SignatureValidator signatureValidator = new SignatureValidator(
                                new X509CredentialImpl(x509Certificate));
                        signatureValidator.validate(assertion.getSignature());
                    }
                    else{
                        throw new WSSecurityException(WSSecurityException.FAILURE, "SAMLTokenUntrustedSignatureKey");
                    }
View Full Code Here

                    "cannot get certificate or key"
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
                        "empty", ex, "SAML signature validation failed");
            }
            signatureKeyInfo = samlKeyInfo;
View Full Code Here

                        "cannot get certificate or key"
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(signature);
            } catch (ValidationException ex) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
                        "empty", ex, "SAML signature validation failed");
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.