@SuppressWarnings({"unchecked", "rawtypes"})
    private List<String> extractUserRoles(Map<String, Object> map, String[] rolePath) {
        Object field = extractClaim(map, rolePath);

        if (field instanceof List list) {
            return list;
        }
        if (field instanceof String string) {
            return getRolesFromString(string);
        }
        return EMPTY_LIST;
    }
The path to the claim to extract user display name
server/src/main/java/com/epam/aidial/core/server/security/IdentityProvider.java