@Override
    public String getUsernameFromQuery(final Map<String, List<Object>> query) {
        val usernameAttributeValues = getUsernameAttributeValues(query);
        LOGGER.debug("Username attribute value found from the query map is [{}]", usernameAttributeValues);
        
        if (usernameAttributeValues == null || usernameAttributeValues.isEmpty()) {
            return null;
        }

        val firstValue = usernameAttributeValues.getFirst();
        if (firstValue == null) {
            return null;
        }

        val username = StringUtils.trimToNull(String.valueOf(firstValue));
        if (username == null || username.contains(PersonAttributeDao.WILDCARD)) {
            return null;
        }

        return username;
    }
Provides the username attribute based on a pre-configured string. Determines the username from a query Map based
on the configured attribute, {@link StringUtils#trimToNull(String)}, and if the username value does not contain a
wildcard.

@author Eric Dalquist
@since 7.1.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/SimpleUsernameAttributeProvider.java