default <T> Optional<T> getRequestAttribute(final String name, final Class<T> clazz) {
        return getRequestAttribute(name).map(clazz::cast);
    }
Return a request attribute typed to a strong type.
The attribute, if found, will be casted down to the given type.
@param <T>   the type parameter
@param name  the name of the attribute
@param clazz the clazz
@return the attribute
pac4j-core/src/main/java/org/pac4j/core/context/WebContext.java