public <T> T getAttribute(final String name, final Class<T> clazz) {
        val attribute = getAttribute(name);
        return getAttributeByType(name, clazz, attribute);
    }
Return the attribute with name.

@param name the attribute name
@param clazz the class of the attribute
@param <T> the type of the attribute
@return the attribute by its name
@since 1.8
pac4j-core/src/main/java/org/pac4j/core/profile/BasicUserProfile.java