Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,24 @@ public void setGroupFilterPattern(@Default(DEFAULT_GROUP_FILTER_PATTERN) String
groupPattern = Pattern.compile(this.groupFilterPattern);
}

public void copyRequestHeaderFields(HttpUriRequest outboundRequest, HttpServletRequest inboundRequest, boolean shouldAddExpect100Header) {
super.copyRequestHeaderFields(outboundRequest, inboundRequest, shouldAddExpect100Header);
addPrincipalAndGroups(outboundRequest);
}

@Override
public void copyRequestHeaderFields(HttpUriRequest outboundRequest,
HttpServletRequest inboundRequest) {
super.copyRequestHeaderFields(outboundRequest, inboundRequest);
addPrincipalAndGroups(outboundRequest);
}

private void addPrincipalAndGroups(final HttpUriRequest outboundRequest) {
//If there are some headers to be appended, append them
Map<String, String> extraHeaders = getOutboundRequestAppendHeaders();
if(MapUtils.isNotEmpty(extraHeaders)){
extraHeaders.forEach(outboundRequest::addHeader);
}

/* If we need to add user and groups to outbound request */
if(shouldIncludePrincipalAndGroups) {
Map<String, String> groups = addPrincipalAndGroups();
Expand Down
Loading