private static Optional<String> requestBearerToken(DiscFilterRequest req) {
        return Optional.ofNullable(req.getHeader("Authorization"))
                .filter(h -> h.startsWith("Bearer "))
                .map(t -> t.substring("Bearer ".length()).trim())
                .filter(t -> !t.isBlank());

    }
Token data plane filter for Cloud

@author bjorncs
jdisc-security-filters/src/main/java/com/yahoo/jdisc/http/filter/security/cloud/CloudTokenDataPlaneFilter.java