public static String sanitizeIdentifier(final Object id) {
        if (id != null) {
            var sId = id.toString();
            if (sId.contains(Pac4jConstants.TYPED_ID_SEPARATOR)) {
                val profileClass = StringUtils.substringBefore(sId, Pac4jConstants.TYPED_ID_SEPARATOR);
                for (val profileClassPrefix : getProfileClassPrefixes()) {
                    if (profileClass.startsWith(profileClassPrefix)) {
                        return sId.substring(profileClass.length() + 1);
                    }
                }
            }
            return sId;
        }
        return null;
    }
Sanitize into a string identifier.

@param id the identifier object
@return the sanitized identifier
pac4j-core/src/main/java/org/pac4j/core/profile/ProfileHelper.java