public static Duration newDuration(final long length) {
        return Duration.ofSeconds(length);
    }
New duration.

@param length the length in seconds.
@return the duration
pac4j-config/src/main/java/org/pac4j/config/ldaptive/LdaptiveAuthenticatorBuilder.java