protected List<Attribute> collectAssertionAttributes(final Assertion subjectAssertion) {
        final List<Attribute> attributes = new ArrayList<>();
        for (val attributeStatement : subjectAssertion.getAttributeStatements()) {
            for (val attribute : attributeStatement.getAttributes()) {
                attributes.add(attribute);
            }
            if (!attributeStatement.getEncryptedAttributes().isEmpty()) {
                if (decrypter == null) {
                    logger.warn("Encrypted attributes returned, but no keystore was provided.");
                } else {
                    for (val encryptedAttribute : attributeStatement.getEncryptedAttributes()) {
                        try {
                            attributes.add(decrypter.decrypt(encryptedAttribute));
                        } catch (final DecryptionException e) {
                            logger.warn("Decryption of attribute failed, continue with the next one", e);
                        }
                    }
                }
            }
        }
        return attributes;
    }
<p>collectAssertionAttributes.</p>

@param subjectAssertion a {@link Assertion} object
@return a {@link List} object
pac4j-saml/src/main/java/org/pac4j/saml/sso/impl/SAML2AuthnResponseValidator.java