"Attempting to impersonate a user, when impersonation is not allowed" + " for JWT provider") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); return Optional.of(OutboundSecurityResponse.builder() .description("Cannot do explicit user propagation if no kid is defined.") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); } else {
"Attempting to impersonate a user, when impersonation is not allowed" + " for JWT provider") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); return Optional.of(OutboundSecurityResponse.builder() .description("Cannot do explicit user propagation if no kid is defined.") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); } else {
.status(SecurityResponse.SecurityStatus.SUCCESS);
"Attempting to impersonate a user, when impersonation is not allowed" + " for JWT provider") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); return Optional.of(OutboundSecurityResponse.builder() .description("Cannot do explicit user propagation if no kid is defined.") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); } else {
"Attempting to impersonate a user, when impersonation is not allowed" + " for JWT provider") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); return Optional.of(OutboundSecurityResponse.builder() .description("Cannot do explicit user propagation if no kid is defined.") .status(SecurityResponse.SecurityStatus.FAILURE) .build()); } else {
SecurityEnvironment nextEnv = updateRequestHeaders(call.outboundEnv, thisResponse); builder.status(thisResponse.status()); return new OutboundCall(builder.build(), call.inboundContext, nextEnv, call.outboundConfig); });
/** * 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(); }