docs: public String resolvePrincipal(Session session) {
        String principalName = session.getAttribute(PRINCIPAL_NAME_INDEX_NAME);
        if (principalName != null) {
           return principalName;
        }
        Object authentication = session.getAttribute(SPRING_SECURITY_CONTEXT);
        if (authentication != null) {
           Expression expression = parser.parseExpression("authentication?.name");
           return expression.getValue(authentication, String.class);
        }
        return null;
     }