public Optional<String> getRFC822EmailAddress(final Collection<List<?>> subjectAltNames) {
        if (subjectAltNames == null || subjectAltNames.isEmpty()) {
            return Optional.empty();
        }
        return subjectAltNames
                .stream()
                .filter(name -> name.size() == 2 && (Integer) name.getFirst() == SAN_RFC822_EMAIL_TYPE)
                .findFirst()
                .map(objects -> (String) objects.get(1));
    }
Get Email Address.

@param subjectAltNames list of subject alternative name values encoded as collection of Lists with two elements in each List containing type and value.
@return String email address or null if the item passed in is not type 1 (rfc822Name)
as expected to be returned by implementation of {@code X509Certificate.html#getSubjectAlternativeNames}
@see <a href="http://docs.oracle.com/javase/7/docs/api/java/security/cert/X509Certificate.html#getSubjectAlternativeNames()">
X509Certificate#getSubjectAlternativeNames</a>
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/principal/X509ExtractorUtils.java