/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { Response response = (Response) parentSAMLObject; if (childSAMLObject instanceof Assertion) { response.getAssertions().add((Assertion) childSAMLObject); } else if (childSAMLObject instanceof Status) { response.setStatus((Status) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
List<Assertion> assertions = ((Response) response).getAssertions(); if (assertions != null && assertions.size() > 0) { log.info("Attempting to extract issuer from enclosed SAML 1.x Assertion(s)");
@Override protected void prepareResponse(final Response response, final Map<String, Object> model) { final Authentication authentication = getAssertionFrom(model).getChainedAuthentications().get(0); final DateTime issuedAt = response.getIssueInstant(); final Service service = getAssertionFrom(model).getService(); final Object o = authentication.getAttributes().get(RememberMeCredentials.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME); final boolean isRemembered = o == Boolean.TRUE && !getAssertionFrom(model).isFromNewLogin(); // Build up the SAML assertion containing AuthenticationStatement and AttributeStatement final Assertion assertion = newSamlObject(Assertion.class); assertion.setID(generateId()); assertion.setIssueInstant(issuedAt); assertion.setIssuer(this.issuer); assertion.setConditions(newConditions(issuedAt, service.getId())); final AuthenticationStatement authnStatement = newAuthenticationStatement(authentication); assertion.getAuthenticationStatements().add(authnStatement); final Map<String, Object> attributes = authentication.getPrincipal().getAttributes(); if (!attributes.isEmpty() || isRemembered) { assertion.getAttributeStatements().add( newAttributeStatement(newSubject(authentication.getPrincipal().getId()), attributes, isRemembered)); } response.setStatus(newStatus(StatusCode.SUCCESS, null)); response.getAssertions().add(assertion); }
for (Assertion assertion : artifactContext.getOutboundSAMLMessage().getAssertions()) { artifact = artifactBuilder.buildArtifact(artifactContext, assertion); if(artifact == null){
if (response.getAssertions() != null) { for (org.opensaml.saml1.core.Assertion assertion : response.getAssertions()) { signObject(assertion.getSignature());
if (response.getAssertions() != null) { for (org.opensaml.saml1.core.Assertion assertion : response.getAssertions()) { signObject(assertion.getSignature());