private SecurityEnvironment updateRequestHeaders(SecurityEnvironment env, OutboundSecurityResponse response) { SecurityEnvironment.Builder builder = env.derive(); response.requestHeaders().forEach(builder::header); return builder.build(); }
void extractQueryParams(SecurityContext securityContext, ServerRequest req) { Map<String, List<String>> headers = new HashMap<>(); queryParamHandlers.forEach(handler -> handler.extract(req, headers)); //the following line is not possible, as headers are read //only in web server, must explicitly send them with security requests //headers.forEach(req.headers()::put); // update environment in context with the found headers securityContext.env(securityContext.env().derive() .headers(headers) .build()); }
SecurityEnvironment.Builder outboundEnv = context.env().derive(); outboundEnv.method(requestContext.getMethod()) .path(requestContext.getUri().getPath())
void extractQueryParams(SecurityContext securityContext, ServerRequest req) { Map<String, List<String>> headers = new HashMap<>(); queryParamHandlers.forEach(handler -> handler.extract(req, headers)); //the following line is not possible, as headers are read //only in web server, must explicitly send them with security requests //headers.forEach(req.headers()::put); // update environment in context with the found headers securityContext.setEnv(securityContext.getEnv().derive() .headers(headers) .build()); }
SecurityEnvironment.Builder outboundEnv = context.env().derive(); outboundEnv.method(requestContext.getMethod()) .path(requestContext.getUri().getPath())