return builder.build(); }).orElse(OutboundSecurityResponse.empty());
return new OutboundCall(builder.build(), call.inboundContext, nextEnv, call.outboundConfig); }); } else {
/** * There is nothing we can add - e.g. we do not propagate identity. * * @return response with no headers */ public static OutboundSecurityResponse empty() { return builder().status(SecurityStatus.SUCCESS).build(); }
/** * Create a response with these headers. Only needs additional headers (e.g. actual headers sent with * request will be existing headers + headers provided here). * * @param headers Headers to add to request to propagate identity (can also be used to delete headers, if the value list * is empty) * @return response correctly initialized */ public static OutboundSecurityResponse withHeaders(Map<String, List<String>> headers) { return builder().status(SecurityStatus.SUCCESS).requestHeaders(headers).build(); }