public static SimplePersonAttributes fromAttribute(final String attribute, final Map<String, List<Object>> attributes) {
        if (attributes.containsKey(attribute)) {
            return new SimplePersonAttributes(attributes.get(attribute).getFirst().toString(), attributes);
        }
        return new SimplePersonAttributes(attributes);
    }
Build simple person from username attribute.

@param attribute  the attribute
@param attributes the attributes
@return the simple person attributes
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/SimplePersonAttributes.java