public Optional<String> retrieveTheEDIPI(final String commonName) {
        val st = new StringTokenizer(commonName, ".");
        while (st.hasMoreTokens()) {
            val token = st.nextToken();
            if (isTokenEDIPI(token)) {
                return Optional.of(token);
            }
        }
        return Optional.empty();
    }
Retrieve EDIPI number from common name.
@param commonName Value of CN field.
@return EDIPI number if found or empty string.
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/principal/X509ExtractorUtils.java